Sign in to follow this  
Followers 0
alucard

administrateur

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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) :)

Share this post


Link to post
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?

Share this post


Link to post
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
Sign in to follow this  
Followers 0