Most of the questions relating to this seem to be centered on hiding the command prompt window when running a batch file at startup. I seem to be having the opposite problem.
I'm trying to run a batch file on startup as an administrator, and without having to click through the UAC prompt. I have followed the instructions here, and have set up a scheduled task to invoke a batch file. The thing is, I cannot get a command prompt to start and remain open. If I have a command line such as:
cmd /c "C:\Users\JoeBloggs\Batch\BackgroundBatchTask.bat"
and I run it from Start/Run
, it opens a command window and invokes the batch file, which is what I want (BackgroundBatchTask.bat
is a batch file that never exits). If I create a task to be run at startup with highest privileges and use the same command line, when I test it by right-clicking on the task and selecting "run", I see the task start in the task manager, but there is no window. What could my problem be? (and yes, the hidden
checkbox is not checked).
runas
in that case?