Jump to content

RunAsSet + Vista = Don't Work


Recommended Posts

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

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.

:whistle:

Link to comment
Share on other sites

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.

:whistle:

thx a lot :lmao: , 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

thx a lot :whistle: , but your tips don't work. :lmao:

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

Try 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

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 !!!!!!! :whistle:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...