Hey all,
I have a script that performs in three sections (not modular though): Setup, Run, Cleanup. Simple enough, eh?
In the Run section, I have a shell script being run with administrator privileges. However, when I cancel out of the password box, my script quits without running the Cleanup lines.
I need the Cleanup lines to be run regardless of whether the shell script with administrator privileges is run or not.
Any ideas?
I have a script that performs in three sections (not modular though): Setup, Run, Cleanup. Simple enough, eh?
In the Run section, I have a shell script being run with administrator privileges. However, when I cancel out of the password box, my script quits without running the Cleanup lines.
I need the Cleanup lines to be run regardless of whether the shell script with administrator privileges is run or not.
Any ideas?
Code:
--Setup
**setup code here**
--/Setup
do shell script "./foo.ss" with administrator privileges
--Cleanup
**cleanup code here
--/Cleanup