hot202 Posted August 17, 2009 Posted August 17, 2009 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.
Juvigy Posted August 17, 2009 Posted August 17, 2009 #RequireAdmin wont work if you dont have admin rights. You can try: RunAs($user, "$domain or computername", $pass,0,@ScriptName,@ScriptDir)
hot202 Posted August 17, 2009 Author Posted August 17, 2009 (edited) #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 August 17, 2009 by MrParo
Juvigy Posted August 17, 2009 Posted August 17, 2009 RunAs($user, "$domain or computername", $pass,0,@ScriptName,@ScriptDir) That line starts your script with another account rights. If your account doesnt have admin rights on the other computer it wont work.
hot202 Posted August 17, 2009 Author Posted August 17, 2009 yeah but i dont want to put my accounts in it if im going to give the program to other people and then it wont run as admin on there computers
Juvigy Posted August 17, 2009 Posted August 17, 2009 So it wont work as admin then if the other guys dont have admin rights.
hot202 Posted August 17, 2009 Author Posted August 17, 2009 every1 will have admin rights. u know how when u right click on a program and chose run as admin isnt there away to to that with a code like run?
Juvigy Posted August 17, 2009 Posted August 17, 2009 I dont understand. If they are admins , what is the problem? Everything should be fine with the admin rights.
hot202 Posted August 17, 2009 Author Posted August 17, 2009 thanks anyway guys but i got it working another way i just made the program to make a shortcut and then the programruns the shortcut
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now