ERROR: User credentials are not allowed on the local machine
Posted: 15 Jul 2010 01:34
What I want to do is to create a scheduled task that has a author different than the current user.
Running this:
schtasks /create /SC MINUTE /MO 5 /TN test /TR "c:\test\test.bat" /U system /f
Gives me: "ERROR: Invalid syntax. Cannot specify user name without specifying system name."
To fix this, I used the /s switch fallowed by system name. Sadly, even giving the system name gives me a different problem:
schtasks /create /SC MINUTE /MO 5 /TN test /TR "c:\test\test.bat" /s computername /U system /f
Gives me: "ERROR: User credentials are not allowed on the local machine"
Is there a way around this? I've tried the switch /RU fallowed by the user name, but that only changes the user the scheduled task use to run, not the author) Also, is there a variable for the system name? (So that I don't have to know it/ change it each time for each different computer) Something like [/s %currentsystem%]
Edit: Subject changed from "system name"
Running this:
schtasks /create /SC MINUTE /MO 5 /TN test /TR "c:\test\test.bat" /U system /f
Gives me: "ERROR: Invalid syntax. Cannot specify user name without specifying system name."
To fix this, I used the /s switch fallowed by system name. Sadly, even giving the system name gives me a different problem:
schtasks /create /SC MINUTE /MO 5 /TN test /TR "c:\test\test.bat" /s computername /U system /f
Gives me: "ERROR: User credentials are not allowed on the local machine"
Is there a way around this? I've tried the switch /RU fallowed by the user name, but that only changes the user the scheduled task use to run, not the author) Also, is there a variable for the system name? (So that I don't have to know it/ change it each time for each different computer) Something like [/s %currentsystem%]
Edit: Subject changed from "system name"