Error running schtasks.exe
I've setup a script to create a task, but I'm getting an error. I have the script setup as an Online KScript. And have the following line in "On Success" Launch “$(KACE_SYS_DIR)\schtasks.exe” with params “/Create /XML ”\\uncname\folder\task.xml“ /tn ”UAC Whitelist\foldername“”
But it errors with.
Running as SYSTEM ERROR: Access is denied. Launched Process: schtasks.exe Invalid number of parameters
Also I'm attempting to copy a shortcut to the user's desktop %username%\desktop, it says "the operation completed successfully" but the file isn't on the desktop.
I've tested this with a batch file that I run manually on the desktop with elevated access and it works.
Thanks
1 Comment
[ + ] Show comment
Answers (2)
Please log in to answer
Posted by:
chucksteel
8 years ago
Posted by:
SMal.tmcc
8 years ago
Now my issue is that the task that is being created is setting the Security Options to System and won't run the task. Anyone know how\what to assign in the .xml to allow the currently logged on user to the security options? - bharper 8 years ago