avoiding authentication

The computers in my school’s TV journalism class have installed on them iMovie 4 and Final Cut Pro 4. Turns out when you install Final Cut it adds files that keep iMovie from communicating with a DV camera. So I wrote a script that when run would move the files out of the Library folder they are installed in to a folder on the top level of the hard drive then restart the computer. The script runs great…on root. On any other user it asks for an admin name and password for each file, which defeats the whole purpose of the script which was to keep them from having to call me whenever they needed to export. (it says it needs an admin to authorise modifying the Finder) Is there anyway on the restricted users to automatically authenticate or just skip the authentication completely?


set fileUno to "Untitled:Users:Joshua:Desktop:A:File1.rtf"
try
	alias fileUno
	tell application "Finder" to move "Untitled:Users:Me:Desktop:A:File1.rtf" to "Untitled:Users:Me:Desktop:B:"
on error --> file doesn't exist
	tell application "Finder" to move "Untitled:Users:Me:Desktop:B:File1.rtf" to "Untitled:Users:Me:Desktop:A:"
end try
display dialog "Restart now?" buttons {"Cancel", "OK"} default button 2
set fileDos to "Untitled:Users:Joshua:Desktop:A:File2.rtf"
try
	alias fileDos
	tell application "Finder" to move "Untitled:Users:Me:Desktop:A:File2.rtf" to "Untitled:Users:Me:Desktop:B:"
on error --> file doesn't exist
	tell application "Finder" to move "Untitled:Users:Me:Desktop:B:File2.rtf" to "Untitled:Users:Me:Desktop:A:"
end try
display dialog "Restart now?" buttons {"Cancel", "OK"} default button 2
tell application "Finder" to restart

that’s not exactly what I have, that’s what I did on my home computer when learning how to write the script (it’s actually my first time using AppleScript; I’ve used similar languages before but never this one). The one at school has different file names and locations and the last two lines are different I think, but that doesn’t really matter.

I’m probably being stupid, but how about changing the permissions of the folders in question?

that’s not stupid, but that’s the first thing I tried. I wish it were just that, I know how to deal with that. I think it’s wanting to authenticate the sending commands to the Finder. :?

edit
just had a thought. if I can’t control the authentication dialogue directly, isn’t there a way I could send a mouse click to a certain point on the screen and then send the password as a bunch of key presses?

not without a slighly inept user being able to capture your password

by doing it that way you may comprimise the integrity of your password

you might try running a shell script to move the files

 do shell script  mv source target 

that way you can avoid the rights issues with the finder

as long as the user has permissions on the files/folders moving to/from all should be good

hope that makes sense

figured it out, it was in the access privileges after all. After saving the script as a stand alone application I had to allow everyone read/write access to the application. Makes no sense to me, but that’s what did it.

and joe, I know that it’d be easy to get my password had I done it that way, but it’s not a secure network, our passwords are our school ID numbers so it’s not like they couldn’t get into things anyway. The user accounts are simply there to keep their files in their own folders and to keep them from using programs until they have tested and can move on.