I wrote a batch file to run a schtasks
for a Windows 7 Home machine. When I tested it in my account (standard user), the script runs correctly, but when I migrated the script to the account (also standard user, on the same computer) where it will be normally used, it would run properly until it came to the command schtasks /create ...
, at which point it would display ERROR: Access is denied.
As far as I am able to tell, the settings on both accounts are the same - standard user, no admin privileges. (As schtasks
works in one standard account, I can't understand why it is denying access.) The task that I am trying to create is an auto-logout feature, which only runs in the account that runs the script. The script in question lives on the desktop of each account. It may well be that the error is due to account settings, but I don't know how to figure that out.
Error: Access is denied.