CMD step (Software Packages)
The CMD step allows you to run command-line instructions in the same way you would run commands from a Command Prompt window.
This step is commonly used for lightweight configuration tasks, file system changes, registry commands, or simple scripting during a build.
When to use a CMD step
Use a CMD step when you need to:
- Run one or more command-line commands
- Create or modify folders and files
- Apply permissions
- Write simple logs or markers
- Run built-in Windows command-line utilities
For more complex logic or scripting, a PowerShell step may be more appropriate.
CMD step screen overview
When you add a CMD step to a Software Package, the CMD properties screen is displayed.
From this screen, you can:
- Enter or paste commands in the CMD text editor
- Enable or disable the step
- Define a Working Folder used when commands are executed
- Configure Checks to validate successful execution
- Configure Targeting to control when the step runs
Entering commands
Commands entered into the editor are executed sequentially during this step.
You can enter:
- Single-line commands
- Multiple commands across multiple lines
- Any command supported by the Windows command interpreter
Commands are executed in the order they appear in the editor.
Working Folder
The Working Folder defines the directory context used when the CMD commands are executed.
If set, all relative paths used in the command editor are resolved from this folder.
If left blank, commands run using the default execution context.
Setting a Working Folder can help simplify command syntax and reduce the risk of path-related errors.
Active and inactive steps
The Active option controls whether the CMD step runs as part of the Software Package.
- Active steps are executed during deployment
- Inactive steps are skipped without being deleted
This is useful for testing, troubleshooting, or temporarily disabling logic without removing it.
CMD step and batch files
The CMD step does not directly reference a .CMD or .BAT file.
If you already have an existing batch file, you can use it in one of the following ways:
- Paste the contents of the file directly into the CMD step editor (recommended)
- Treat the batch file as an executable and use the Execute Step type instead, specifying the
.CMDor.BATpath and filename in the Executable Path field
Using Checks and Targeting
You can optionally use the Checks and Targeting tabs with CMD steps.
- Checks can confirm that expected outcomes occurred (such as a file being created, or to check for a text string within a file)
- Targeting can limit execution to specific devices or conditions
Using these options helps improve reliability and control over when commands run.
Common questions
Can I run multiple commands in a single CMD step?
Yes.
You can include multiple commands, each on its own line, and they will run in sequence.
Should I use CMD or PowerShell?
Use CMD for simple command-line tasks.
For advanced scripting, logic, or error handling, consider using a PowerShell step.
Can I disable a CMD step without deleting it?
Yes.
Unchecking Active prevents the step from running while keeping its configuration intact.
Related articles
- Software Packages overview
- Steps tab overview
- Execute step
- PowerShell step
- Using Checks in Software Package steps

