Follow

Cannot execute native DOS commands as SYSTEM

PROBLEM
You have an agent procedure that uses the ExecuteShellCommand() step.
If running an application, such as a backup tool - an EXE file, and you have specified it to run as SYSTEM, the process behaves as expected.
However, when running a DOS command, such as echo, the command executes as the current user, not SYSTEM.

CAUSE
This is a known limitation. Native commands - dir, echo, cd, del, ren, etc will always run as the current user, never as system.

WORKAROUND
To use the native command line functions, write a batch file that is executed, rather than calling them directly, for example

c:\kworking\movefile.bat
c:
cd\temp
move logfile.log d:\backups

Agent procedure
1. ExecuteShellCommand() - c:\movefile.bat - run as SYSTEM

Was this article helpful?
3 out of 3 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.