Ask the Community
Groups
Cannot execute native DOS commands as SYSTEM - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>PROBLEM</strong><br>You have an agent procedure that uses the ExecuteShellCommand() step.<br>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.<br>However, when running a DOS command, such as echo, the command executes as the current user, not SYSTEM.<br><br><strong>CAUSE</strong><br>This is a known limitation. Native commands - dir, echo, cd, del, ren, etc will always run as the current user, never as system.<br><br><strong>WORKAROUND</strong><br>To use the native command line functions, write a batch file that is executed, rather than calling them directly, for example<br><br>c:\kworking\movefile.bat<br>c:<br>cd\temp<br>move logfile.log d:\backups<br><br>Agent procedure<br>1. ExecuteShellCommand() - c:\movefile.bat - run as SYSTEM<br><br></p> </article> </main>