On Windows 8.1, I am trying to start a program from a batch file which is called during startup and I want the program to run as Administrator. Here is what I do:
- I have a program prog.exe under c:\program files\MyProgram
- The EXE is flagged to "Run as Administrator"
- Under c:\program files\MyProgram there is a batch file called RunEXE.bat. It contains all sorts of things and the end it contains a line "start prog.exe"
- under "C:\programdata\Microsoft\Windows\Start Menu\Programs\StartUp" there is a shortcut to RunEXE.BAT.
- When I reboot the PC I expect the shortcut to launch the RunEXE.BAT which in turn will run PROG.EXE.
But it does not happen. There is a short "bleep" sound as if Windows is displaying a message asking to confirm the program should run as Administrator but nothing is visible on the screen.
a) If I flag the shortcut & exe NOT to run as admin, then the EXE is launched.
b) If I flag the shortcut & exe to run as admin, then the EXE is not launched.
c) If I flag the shortcut to NOT to run as admin and the EXE to run as admin then the EXE is launched but it does not run as administrator.
d) Startup shortcut to the EXE. (No batch). Shortcut not flagged to run as administrator, EXE is flagged: EXE not running.
e) Startup shortcut to the EXE. (No batch). Shortcut not flagged to run as administrator, EXE not flagged: EXE is running but not as administrator.
I tried disabling the UAC completely - same results. I also tried to have another EXE instead of the batch, with the same results.
So - is there a way to have a shortcut to an EXE from startup which will run an EXE as administrator?