Cardinal System
Honorable Member
- Joined
- Jan 24, 2016
- Messages
- 87
- Thread Author
-
- #1
I have a batch file that runs on logon as a task, but it does not work on non-admin desktops because it uses admin level commands. I want it to run as administrator without prompting the user for a password. I tried going into the file properties, clicking compatibility, and checking "Run This Program As An Administrator", but the check box was grayed out and couldn't be checked.
What can I do?
What can I do?
Solution
Your best option would be to create a scheduled task
- Open Task Scheduler
- I typically create a folder for my non-Microsoft tasks. I just called it "My Tasks"
- Select the folder and right click in the center pane and select "Create a new task"
- Under the general tab give it a name and under the security section change the user it runs as to SYSTEM
- "Run whether a user is logged on or not will auto select and run with highest privileges and Hidden
- Go to the trigger tab and set the trigger to be "At log on" and details to "At log on of any user"
- Under Actions tab select "start a program" and select your batch file
- Conditions tab is optional settings, I usually uncheck all the power settings but it's up to you...
- Joined
- Jul 4, 2015
- Messages
- 8,998
Your best option would be to create a scheduled task
- Open Task Scheduler
- I typically create a folder for my non-Microsoft tasks. I just called it "My Tasks"
- Select the folder and right click in the center pane and select "Create a new task"
- Under the general tab give it a name and under the security section change the user it runs as to SYSTEM
- "Run whether a user is logged on or not will auto select and run with highest privileges and Hidden
- Go to the trigger tab and set the trigger to be "At log on" and details to "At log on of any user"
- Under Actions tab select "start a program" and select your batch file
- Conditions tab is optional settings, I usually uncheck all the power settings but it's up to you
- Settings tab is some optional stuff for if the program fails etc.
- Reboot and test
Cardinal System
Honorable Member
- Joined
- Jan 24, 2016
- Messages
- 87
- Thread Author
-
- #3
There were no options to run as SYSTEM. I also wanted it to run for all users, but the check box for that was grayed out. Then I ran task scheduler as administrator, and everything I needed showed up, including the SYSTEM option. Thank you for your help! Ignore the screenshot, it was an accident.Your best option would be to create a scheduled task
- Open Task Scheduler
- I typically create a folder for my non-Microsoft tasks. I just called it "My Tasks"
- Select the folder and right click in the center pane and select "Create a new task"
- Under the general tab give it a name and under the security section change the user it runs as to SYSTEM
- "Run whether a user is logged on or not will auto select and run with highest privileges and Hidden
- Go to the trigger tab and set the trigger to be "At log on" and details to "At log on of any user"
- Under Actions tab select "start a program" and select your batch file
- Conditions tab is optional settings, I usually uncheck all the power settings but it's up to you
- Settings tab is some optional stuff for if the program fails etc.
- Reboot and test
Attachments
Last edited: