Jump to content

Run as admin


 Share

Recommended Posts

ok i have a prob i have made a script so that i click lunch to open a game but the game needs to run in admin to work

is there away that i cam make it run the program that it launches to launch as admin this is what im using

Case $msg = $StartGame
            $Location = IniRead("C:\Location.ini", "Game Location", "dir", "")
            Run($Location & "\Game.exe")

i have tryed to add #RequireAdmin but thats dont work.

Link to comment
Share on other sites

#RequireAdmin wont work if you dont have admin rights.

You can try:

RunAs($user, "$domain or computername", $pass,0,@ScriptName,@ScriptDir)

i do have admin rights and will RunAs work on other computers? Edited by MrParo
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...