Leveraging cmd.exe to Create Complex Virtual Software Packages
I often receive e-mails from Juice readers asking me questions about how to package a specific application or group of applications. With each inquiry, I notice that they seem to only know of two ways to package in SVS: Single Program Capture and Global Capture.
There are other (sometimes better) options. Here's some info and advice.
General Practice
For a lot of applications a single program capture is not the way to go, so the packager goes with plan B, starts a Global Capture, and then spends hours cleaning out the package and working to keep the application running and functional.
The Road Less Traveled
Even though it's mentioned a couple of times on the Juice, application packagers forget the third (and very effective) way to create Virtual Software Packages.
So here's the right solution for packaging a single layer with more installs.
- Create a new layer, and do a Single Program Capture.
- Type the following application name to capture: cmd.exe.
- Start capturing.
- A nice black screen appears, and everything you start from within this screen will be captured, including all tasks that are started by a application that is started from within the dos box.
- So now you are probably thinking about typing all the command lines to the application in the DOS box, but that can be done very easy also.
- Just drag and drop the executable that you wish to package to the cmd box and press enter.
- When you finish, type "Exit" in the box.
Now you have a multiprogram (but clean) layer that does all it should for you.
Regards
ErikW
Editor's Note: Get more info and comprehensive coverage of this technique in Wm Jesse Foster's great article that covers this method in detail.






Great tip
I use this for launching vbscripts that install pre-requisites for the application in question as well as set certain registry keys when required. It's a great way of capturing and allows for a lot of flexibility.
Just what I was looking for!
Thanks.
Saves from activating many layers for one single job!
Nice Tip
Nice tip I have used this in the past I have used Used a Launch of EXPLORER.exe in a similar manner. Open Explorer then lunch stuff from it.
Thanks
Tom Fronza
State of Ohio
Dept. of Taxation
Thanks, great tip. I use
Thanks, great tip.
I use this method with the runas command when I want to have an admin window that I can launch applications from and never even thought of using it for capturing. I guess sometimes the best solutions are right under our noses.