Search code examples
macosauthenticationhookuser-accounts

loginhook for guest account mac


I need to make a login hook for the guest user in mac. This script simply copies an app in application folder to the desktop of Guest user. I have the following script and it works perfectly for any other user, i.e, for a user named VSI:

tell application "Finder"

copy file "iMac HD:Applications:mix.app" to folder "iMac HD:Users:VSI:Desktop"
end tell

for Guest user, I googled, and the script should be:

tell application "Finder"

copy file "iMac HD:Applications:mix.app" to folder "iMac HD:Users:Guest:Desktop"
end tell

How can I make it a login hook?

I tried changing the /library/preferences/com.apple.loginwindow.plist file, but I can't figure out how for the guest pc. I also changed the /etc/ttys file, but it is not making mix.app a login hook for all users.


Solution

  • done... i found the answer...simple... a loginhook or a logout hook is for a mac pc and is independant of user... thats it i guess