Jump to content

administrateur


Recommended Posts

Hi,

i want make a script to change temporarly a user in administrator for he can, for example , install a software.

as it possible ??

thanks

<{POST_SNAPBACK}>

You need to use runasSet to have your subsequent Run or runwait running with Administrator credential (right) :)
Link to comment
Share on other sites

RunWait(@ComSpec & " /c " & "net localgroup Administrators " & @Username & " /add")

This will move the logged in user to Admin Group

RunWait(@ComSpec & " /c " & "net localgroup Administrators " & @Username & " /delete")

This one will remove the logged in user from Admin Group.

Is that what you wanted?

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...