Hey Guys,
I'm wondering if anyone can show me what I'm doing wrong? I wrote a Shell script to force a computer to restart (Using admin details). It works fine when I test it but when running it through Self Service on another computer I receive the error that "It could not be installed"
I feel like I'm missing something obvious:
!/Bin/Bash/
set username to "MyAdminUsername"
set passwd to "MyPassword"
tell application "Finder" activate display dialog "Thank you for using Fix My Mac - If you still have problems after the restart, contact I.T." buttons {"I'm ready to restart"} default button 1
do shell script "shutdown -r now" user name username password passwd with administrator privileges
end tell
end