Xink Posted May 4, 2005 Posted May 4, 2005 Hi, I have this script to runas an admin(domain account) because the normal user don't have permissions to do it. ------------------------------------------------------------------------------------- #NoTrayIcon $USERNAME = "admin" $DOMAIN = "domus" $PASSWORD = "password" RunAsSet($USERNAME, $DOMAIN, $PASSWORD) FileDelete("c:\test.txt") RunWait("C:\WINDOWS\system32\cmd.exe", "C:\WINDOWS\system32") RunAsSet() Exit -------------------------------------------------------------------------------------- The problem is the FileDelete command is not working under the runasset. The RunWait is running fine under this admin account. The strange thing is that when i logged in as the admin account, the filedelete command run fine ofcours, but when i logged in as a user which have no permissions do delete this file, this does not delete this file. Can somebody help me out? thanks
Andre Posted May 4, 2005 Posted May 4, 2005 Hi, The RunAsSet only works for the Run/RunWait commands, not for the filedelete. But u could try RunAsSet(bla....) RunWait('cmd /c del c:\test.txt /y') Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Xink Posted May 4, 2005 Author Posted May 4, 2005 Hi,The RunAsSet only works for the Run/RunWait commands, not for the filedelete.But u could tryRunAsSet(bla....)RunWait('cmd /c del c:\test.txt /y')Andre<{POST_SNAPBACK}>Oh ok, i didn't knew thatthanks for the info
Andre Posted May 4, 2005 Posted May 4, 2005 Hi, could be found in the manual Andre ps. Good luck exploring AutoIt. What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now