Jump to content

Script auto RunAs from admistrator..??


Recommended Posts

Hi,..

For All master in this forum..

one`s again question from beginners what the script to auto runas from administrator..??

when I click Exe from compile script, will load run from administrator (in vista & win7) without rightclik (runas adminstrator)

or when click EXE popup runas administrator will going out ..

Thank`s..

In this Script :

$sPath = _FindFile ("\AutoRunSource\image\ImageXP.gho")

Run("ghost32.exe -clone,mode=pload,src=" & $sPath & "\AutoRunSource\image\SalimCD.gho:1,dst=1:1 -auto -sure")

Func _FindFile ($sPath, $sSearch = "All")

If StringLeft ($sPath, 1) <> "\" Then $sPath = "\" & $sPath

Local $aDrives = DriveGetDrive ($sSearch)

For $i = 1 to $aDrives[0]

If FileExists ($aDrives[$i] & $sPath) Then Return $aDrives[$i]

Next

Return SetError (1, 0, "")

EndFunc ; ==> _FindFile

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