daxter Posted July 12, 2007 Share Posted July 12, 2007 hi ! i need your help about RusAsSet command on vista. I looked for any informations about this issue on this forum but i have always the same problem. i need to run a script on XP but compatible on Vista too. To create my script i use this editor : SciTE4AutoIt3 Version 1.71 i want to run this line : RunAsSet("Administrateur", "", "xxxx" ) RunWait("regedit.exe /s winUpdate.reg", @ScriptDir) i try to use #RequireAdmin but no results... how to use my script on vista please thx a lot PS : it's my first script on autoit language ! Link to comment Share on other sites More sharing options...
MHz Posted July 12, 2007 Share Posted July 12, 2007 Try this RunAsSet("Administrateur", "", "xxxx" ) RunWait('regedit.exe /s "' & @ScriptDir & '\winUpdate.reg"', @TempDir) Tips I am aware of: Using #RequireAdmin may cause issues when you ask for admin permissions using RunAsSet(). Set a working directory that is valid for your use when using RunAsSet(). Welcome to AutoIt forum. Link to comment Share on other sites More sharing options...
daxter Posted July 12, 2007 Author Share Posted July 12, 2007 Try this RunAsSet("Administrateur", "", "xxxx" ) RunWait('regedit.exe /s "' & @ScriptDir & '\winUpdate.reg"', @TempDir) Tips I am aware of: Using #RequireAdmin may cause issues when you ask for admin permissions using RunAsSet(). Set a working directory that is valid for your use when using RunAsSet(). Welcome to AutoIt forum. thx a lot , but your tips don't work. i replace my line by your line and deleted my '# RequireAdmin' line but i don't really understand this : "Set a Working directory" @tempdir = temporary folder ? no? i will seek more information about this command thx Link to comment Share on other sites More sharing options...
MHz Posted July 12, 2007 Share Posted July 12, 2007 thx a lot , but your tips don't work. i replace my line by your line and deleted my '# RequireAdmin' linebut i don't really understand this : "Set a Working directory" @tempdir = temporary folder ? no? i will seek more information about this commandthxTry commenting the RunAsSet() and adding #RequireAdmin. If it works that way then RunAsSet() is perhaps failing with the parameters that you are using. Link to comment Share on other sites More sharing options...
daxter Posted July 13, 2007 Author Share Posted July 13, 2007 Try commenting the RunAsSet() and adding #RequireAdmin. If it works that way then RunAsSet() is perhaps failing with the parameters that you are using.THX A LOT, my script work very well now !! I LIKE AUTOIT, i love it, i dream it !!!!!!! Link to comment Share on other sites More sharing options...
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