Home » Questions » Computers [ Ask a new question ]

Running bat file at startup as administrator in Windows 7

Running bat file at startup as administrator in Windows 7

I'm currently running a startup script in form of a bat file successfully in Windows 7 (I've inserted a new registry key entry with the bat file path as value in

Asked by: Guest | Views: 267
Total answers/comments: 4
Guest [Entry]

"Make two batch files:

StartAs.bat contains something along the lines of:

runas /user:SomeLocalAdminAccount c:\Users\MyUser\StartupWhat.bat

StartWhat.bat contains the commands that you want to run."
Guest [Entry]

"runas /user:SomeLocalAdminAccount

Here must be like this:

runas /noprofile /user:mymachine\administrator cmd

runas /profile /env /user:mydomain\admin ""mmc %windir%\system32\dsa.msc

runas /env /user:user@domain.microsoft.com ""notepad \""my file.txt\"""""
Guest [Entry]

"Maybe UACPass (free) will solve it:

Install the program.
Open the UACPass window.
Drag to it the program you are pretending to run at boot.

Done. This program should now run as admin without UAC prompt.
The program even has an option for add to startup :-D .

Your program will only run after logon (or so I think)."
Guest [Entry]

"You can also make a shortcut and specify that the shortcut's file should be run elevated.

(It's in some advanced options box.)"