azz_kikr Posted February 7, 2005 Posted February 7, 2005 can u use the dircreate and the filecopy/fileinstall command as a certain user?? cause i have to install some thing in the program files but it isnt allowed to change the folders/ add files to it? how to do this with a runasset command (i have admin account on pc)
Andre Posted February 7, 2005 Posted February 7, 2005 Hi, Try this part. (found on the forum once) $RUN = 0 If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1] ; set to admin mode If $RUN = 0 Then If Not IsAdmin() Then RunAsSet($USERNAME, @ComputerName, $PASSWORD) ; start the script program (itself) again but now in Adminmode...so all done tasks will run in Adminmode Run('"' & @ScriptFullPath & '" " 1"') If @error = 1 Then MsgBox(48, "Error", "cannot start Admin mode.") EndIf Exit EndIf EndIf 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