Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Starting a program as administrator without prompt
New Posts  All Forums:Forum Nav:

Starting a program as administrator without prompt

post #1 of 11
Thread Starter 
Ok, I'm trying to start War Inc Battlezone on a standard (childrens) user account.

I've got as far as creating a task in Task Scheduler to run with my credentials and then created a shortcut on the desktop for the user in question that runs the task when clicked.

This works, insofar as the game loads without asking for an administrator password, but for some reason it loads into System32 and wants to download another 1000MB of data, when there data is already there in the Steam folder!

In comparison, if I just go ahead and run it from Steam or the steamapps/common folder it asks for the password but, of course, doens't want to redownload a gig of data to /System32/
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
post #2 of 11
disable UAC then u have no prompt... BUT not advised...
Streamer/Gamer
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel i7-5820K Asus X99-A Sapphire R9-290 Crucial Ballistics Sport 16gb 2400mhz 
Hard DriveHard DriveCoolingOS
OCZ Agility 3 60gb Seagate 1TB Corsair H100  Windows 10 64-bit 
MonitorKeyboardPowerCase
3x 22" 1080 monitors Logitech G510 Corsair HX620 Nzxt Switch 810 
MouseMouse PadAudio
Logitech G402 Steel series QCK cloth Logitech G930 headset 
  hide details  
Reply
Streamer/Gamer
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel i7-5820K Asus X99-A Sapphire R9-290 Crucial Ballistics Sport 16gb 2400mhz 
Hard DriveHard DriveCoolingOS
OCZ Agility 3 60gb Seagate 1TB Corsair H100  Windows 10 64-bit 
MonitorKeyboardPowerCase
3x 22" 1080 monitors Logitech G510 Corsair HX620 Nzxt Switch 810 
MouseMouse PadAudio
Logitech G402 Steel series QCK cloth Logitech G930 headset 
  hide details  
Reply
post #3 of 11
Quote:
Originally Posted by Viridian View Post
Ok, I'm trying to start War Inc Battlezone on a standard (childrens) user account.

I've got as far as creating a task in Task Scheduler to run with my credentials and then created a shortcut on the desktop for the user in question that runs the task when clicked.

This works, insofar as the game loads without asking for an administrator password, but for some reason it loads into System32 and wants to download another 1000MB of data, when there data is already there in the Steam folder!

In comparison, if I just go ahead and run it from Steam or the steamapps/common folder it asks for the password but, of course, doens't want to redownload a gig of data to /System32/
What is the command line that is trying to be executed?

When installing the game, is there permission for all users to run it?




Quote:
Originally Posted by kill View Post
disable UAC then u have no prompt... BUT not advised...
No, you can enable administrative execution through Task Scheduler.
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #4 of 11
Thread Starter 
Quote:
Originally Posted by DuckieHo View Post
What is the command line that is trying to be executed?

When installing the game, is there permission for all users to run it?
It's via Steam, but I don't recall an all users option

The commandline is

C:\\Windows\\System32\\schtask.exe /run /tn "RunWarInc"

Even if I run directly via Task Scheduler and not a shortcut, it says the same. I'll be able to get the exact message, but I know the gist of it is that it's obviously running from System32!

Thanks for any help you can give, Duckie
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
post #5 of 11
Hold down Shift, right-click any program shortcut, and you’ll see an option to run the program as a different
user
post #6 of 11
Thread Starter 
^ That doesn't remove the need to enter the administrator's password (mine or my girlfriends) every single time the game wants to be launched. Which would be fine but the user is 12 and there's no way in hell I'm making the oversight of giving him an administrator account again!

I've used Task Scheduler on my system and many others to by-pass the admin rights required for so many programs. Afterburner being the first that comes to mind, so that it runs on boot without either asking for permission to run, and doesn't pester standard users. This way, the PC my stepson uses 100% of the time has Afterburner OCing the GPU no matter who logs on and no matter their level of permission!

In this case, the Free-to-Play game on Steam, War Inc: Battlezone wants administrator access each time it runs (probably because it runs from an updater.exe that autopatches when run). At the moment, the verdict is that we're not willing to get out of bed at 8am just to put the password in for the game. Harsh, I know, but who wants to be up at 8am on saturdays?!

Anyway, the problem is definately that the game is trying to run all it's resources from C:\\Windows\\System32\\ when they're actually stored in G:\\Steam\\steamapps\\common\\. I suspect this is something to do with how the task runs. Task Scheduler is a system app and thus is stored in System32. When I click Run on in Task SCheduler, I assume in the backend the program runs the commandline: schtask.exe /run /tn "RunWarInc" which would automatically revert it to C:\\Windows\\System32\\schtask.exe /run /tn "RunWarInc". Hence the program running from System32.

EDIT:

I've tried to look at runas, too, but had no such luck with it. I tried:

Code:
runas /user:Matt /savecred [programlocationhere]
Once I put my password in it says the program needs to run with elevated privileges and doesn't help at all.

My overall plan is to get either runas or Task Scheduler working and have a customised shortcut on his desktop that runs the game minus UAC prompt. It's possible!
Edited by Viridian - 7/23/11 at 4:27am
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
post #7 of 11
you could disable UAC by going to Run>msconfig>tools>Chance UAC settings and make sure it's disabled
post #8 of 11
post #9 of 11
Thread Starter 
Quote:
Originally Posted by fleXx View Post
you could disable UAC by going to Run>msconfig>tools>Chance UAC settings and make sure it's disabled
Then why don't I just give him an administrator account and, while I'm at it, throw £50 notes into the street and leave a big sign outside my house that says "please, I don't lock my doors, come take all my stuff!"

Sorry to be unnecessarily sarcastic, but disabling UAC is not an option.

Riou, yes, that's basically the same guide I've been following, but when run, either from TS or via a shortcut (or even the commandline, via the search bar in Start) an error pops up letting me know that the game is running from System32 and needs to download another 1GB of data to play... whereas that 1GB of data, and more, are already in the Steam folder.
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel i5 2500 @ 4,004GHz (1.202v) Asus P8P67-PRO B3 Leadtek GTX260 65nm 896MB 700|1430|1100 4GB DDR3 Muskin 1686MHz 
Hard DriveOptical DriveOSMonitor
2xWD CB 250GB, 2x SG 320GB, 1xSS F1 1TB Pioneer DVD-RW Windows 7 Professional 64bit Samsung 2032BW 20" 1680x1050 16:10 
KeyboardPowerCaseMouse
Razer Lycosa CoolerMaster GX 550W Coolermaster Storm Sniper Razer DeathAdder 
Mouse Pad
Razer Goliathus 
  hide details  
Reply
post #10 of 11
Quote:
Originally Posted by Viridian View Post
Then why don't I just give him an administrator account and, while I'm at it, throw £50 notes into the street and leave a big sign outside my house that says "please, I don't lock my doors, come take all my stuff!"

Sorry to be unnecessarily sarcastic, but disabling UAC is not an option.

Riou, yes, that's basically the same guide I've been following, but when run, either from TS or via a shortcut (or even the commandline, via the search bar in Start) an error pops up letting me know that the game is running from System32 and needs to download another 1GB of data to play... whereas that 1GB of data, and more, are already in the Steam folder.
The reason why it probably downloaded the files into System32 folder is because the Task Scheduler executable file is located there.
Edited by Riou - 8/8/11 at 12:46am
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Windows
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Starting a program as administrator without prompt