I am pretty new to scripting and I am looking to create a script that will change some file flags on a folder that has been selected in finder. If possible I would like to do this from an admin account and be able to lock/unlock a folder on a non admin profile. Here is what I have come up with but I can't seem to figure out how to get it to run with sudo
I need these two items to run as sudo, any assistance would be appreciated.
if itemList is not {} then
if theChoice is "Lock" then
do shell script " chflags uappnd " & (itemList as text) --
else -- unlock
do shell script " chflags nouappnd " & (itemList as text) --
end if
end if
I need these two items to run as sudo, any assistance would be appreciated.
if itemList is not {} then
if theChoice is "Lock" then
do shell script " chflags uappnd " & (itemList as text) --
else -- unlock
do shell script " chflags nouappnd " & (itemList as text) --
end if
end if