Click here to Skip to main content
15,888,069 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
can i run a task scheduler as a runas administrator (like the runas administrator command prompt)

i am trying to stop a system service from running automatically. I have put the service in manual and stopped the service but still the service runs. 


What I have tried:

only solution is to stop the service in a defined period.  but i am unable to run a batch file with net stop service command as an administrator in task schedule.

manually running the run as command as an administrator stops the service.
Posted
Updated 9-Feb-18 21:27pm

1 solution

Open Task Scheduler (use "Run as Administrator")
Open the "Task Scheduler Library"
Right click the scheduled task, and select Properties
In the resulting dialog, tick "Run with highest privileges"
Press OK
 
Share this answer
 
Comments
kumardm9328 10-Feb-18 14:22pm    
Run with highest privileges will not work as I have user privileges but the group policy is set such that i can open a command prompt as administrator and use the runas command (runas user:<domainname>\user net stop <service name> command. since the service i am trying to stop is a windows service. I am not able to use task scheduler ( a batch file put in task scheduler) always runs with the privileges of user and not as a administrator
OriginalGriff 11-Feb-18 5:41am    
If you can't run as an admin, then you can't do it.
That's what admin privileges are there for!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900