RichNH
asked on
Run a Bat file as Administrator when I log in
I have a bat file on my desktop in a Win7 Home Premium 64-bit OS. Every time I log in I right click this file and run it as Administrator. I'd like to know how I can set it up to run automatically when I log in. It does need to run as the Admin.
Thanks in advance.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do the following:
go to start - run and type gpedit.msc
go to user configuration - windows settings - scripts (logon / logoff) - logon - add, and browse to your .BAT file and click ok.
now whenever a user logs in, the scripts will run automatically.
go to start - run and type gpedit.msc
go to user configuration - windows settings - scripts (logon / logoff) - logon - add, and browse to your .BAT file and click ok.
now whenever a user logs in, the scripts will run automatically.
Right-click batch file, properties, compatibility, change settings for all users. T
Tick run as admin box.
Move batch file to windows startup in All Programs
Tick run as admin box.
Move batch file to windows startup in All Programs
The scheduled task solution is the best because it elevates automatically.
ASKER
Well, I tried setting the batch file and the shortcut file to run as Admin while in the properties>CompatabilityMo de, but the checkbox that would allow me to do that was not active so I couldn't. I tried to move a copy of the shortcut to the bat file to the Startup folderand was told that that folder is off limits. Strange since my account is an Administrator account and also strange since I also tried to do it in the Administrator account. I thought Admin privs meant access to everything.
Next I'll look into how to create a scheduled task. You guys gotta realize, I'm pretty ignorant about Windows operating systems so be patient. :-)
Next I'll look into how to create a scheduled task. You guys gotta realize, I'm pretty ignorant about Windows operating systems so be patient. :-)
The way with task scheduler is explained here: http://superuser.com/questions/440544/how-to-start-wampserver-without-providing-administrator-privileges
ASKER
Thanks for the suggestion, it works like a charm.
If you need help about startup folder, look here:
< http://www.sevenforums.com/tutorials/1401-startup-programs-change.html >