The Path of where the Drivers are located on the system are in a variable, and we then set the start in to that path:
You could set that folder as your "start in:" location, and then your command line could be "MyUtil.exe" instead of the full path.Įxample of how I use it is for applying drivers during OSD. Let’s say you’ve had a folder of c:companyusefulstuff with a bunch of your tools in it, including MyUtil.exe. Start in: Provides the ability to choose the "context" of where the command you’re running will run against. I’ve honestly never had to use this, but it’s something to keep in your back pocket when troubleshooting why your step might not be working.
The Variable would then have the return from that command (the computer name) and place it into the task sequence variable machinename.ĭisable 64-bit file system redirection: Disables the system from defaulting back to 32-bit windows exe’s. Output to task sequence variable: Whatever information is returned from the command is placed into the variable. List of commands built into window you can leverage: This is the equivalent of running a command in a command prompt, with elevated rights (Runs in the system context as does the entire Task Sequence). The Run Command Line Step is like the swiss army knife of the TS Steps. To automatically clean up these left behind system files, use /AUTOCLEAN instead.This step is documented pretty well, my goal is to add examples and relate some real world use cases vs just the straight up doc material. It will analyze the following locations: C:$Windows.~BT\*Īnd saves two log files for you to inspect: C:\Windows\System32\LogFiles\setupcln\setupact.logĬ:\Windows\System32\LogFiles\setupcln\setuperr.log If you are one of the Windows insiders, you will find this very helpful. Lastly, the /SETUP switch analyzes the system files left from a previous Windows version.
Will save the checkbox settings in the registry and then can be called up by using cleanmgr.exe /sagerun:10 If you would like to have a customized checkbox settings, you can use the switch /SAGESET to set up the settings and /SAGERUN to use it.
cleanmgr.exe /verylowdisk /d cĪlso, running the above command line from an elevated command prompt window will switch to the System Files mode, the mode when you click Clean up system files button in the screenshot above. It does exactly the same as the /LOWDISK does but starts the cleaning process automatically. If you want the process to start automatically, use the switch /VERYLOWDISK instead. The command will launch Disk Cleanup tool against the drive c with all checkbox checked by default. When launched, Disk Cleanup tool opens with all checkboxes checked by default. The switch /LOWDISK is used when a disk drive is running low in disk space. Launches the Disk Cleanup Tool for drive c. cleanmgr.exe /?Īddition to that, you can use the following switch to run the tool on a specified disk drive. Let’s see how many switches are available in the tool by running the following command from a Run dialog box. Normally, you can launch the tool from disk drive’s properties, like below.īut do you also know that it can be launched as a command line with a bunch of switches that can be useful in various situations? Disk Cleanup is a built-in Windows tool that helps end user clean up disk spaces.