How to grant "log on as batch job" in Windows 7 Home Premium
I just spent an hour trying to figure out this one so I thought I'd share the wisdom...
If you have been trying to schedule a task and run it as a regular user in Windows 7 you will probably have come across this...
This is due to a basic security measure implemented in all recent versions of Windows which requires users that run scheduled tasks to have a special security right. (A similar security measure is also used in the services system but when you change the user in the services manager it automatically grants the user the right and tells you its done so.)
Here's where the fun starts... If you have Windows 7 Professional, Ultimate or whatever you can simply go to the local security policy editor (under administrative tools) and assign the right; unfortunately if you are using the home versions you are stuck as the local security policy editor doesn't exist!
So what do you do?
Well you could compromise the security of your system and run the task as an administrator or something but personally I like all my applications to be contained in their own login as a form of damage limitation. Why give a scheduled task access to your whole system when it only needs to read 3 files?
The other option is to find a way to add the right... Being a determined chap I made that my goal, and heres how I managed it:
- Download and install the Windows Server 2003 Resource Kit Tools (yes I know its not the right version of Windows but we only need one executable and that at least seems to work)
- Open a Command Prompt as an administrator. You can do this by clicking the start button followed by "All Programs" then "Accessories". Then right clicking "Command Prompt" and selecting "Run as administrator". (You will need to authorise this if it asked for a password or confirmation.)
- Type the following command:
ntrights -u COMPUTER\User +r SeBatchLogonRight
Remember to replace COMPUTER\user with your computer name and the user account you wish to use.
Hope this helps!
Login to leave a comment...
By logging in you consent to allowing us to store a cookie on your machine which contains a unique encrypted reference to identify you to our servers.