Jump to content

run the script in admin mode


Recommended Posts

i have this script

#Region;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Immagini\O_Odefrag_8.ico
#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****


If Not IsAdmin() Then
    RunAs("Administrator",@ComputerName,"bla bla", @ScriptName,@ScriptDir)
    Exit
EndIf

MsgBox(1,"Deframmentazione",blablablalbla")

RunWait("mmc.exe dfrg.msc",@SystemDir)

but if use it from users dont start why? O_O

PS: i use Scite editor

tnx

Link to comment
Share on other sites

according to the help file:

RunAs ( "username", "domain", "password", logon_flags, "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] )

I guess that you forgot to set the logon_flags

In the beginning there was nothing and then even that exploded - anonymous

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