Search:     Advanced search

How to have a self-extracting Zip file extract to a common folder, like the Desktop

Article ID: 230
Last updated: 22 Sep, 2017
Views: 46868

The Self-Extractor header does not support the use of Environment Variables. In order to cause your self-extractor to place files in a location that can be expressed by using an environment variable, you would need to first extract the files to some set folder that you would designate (such as C:\Target). You would also need to include some sort of script, such as a .bat file, in your Zip file that moves the folder you created to your desired location. This script would then be used as the Command to Issue.

For example, if you would like to have your files extracted to a subfolder named Target whose location would be on the Desktop, you could use something like the following in a .bat file:

MD "%USERPROFILE%\Desktop\Target"
MOVE /Y C:\Target\*.* "%USERPROFILE%\Desktop\Target"

Searching the internet using DOS commands or batch file commands as a search term will provide many sources for more information regarding creating batch files. You may also send a message to Technical Support for help with making this work in a self-extractor.

This article was:   Helpful | Not Helpful
Prev   Next
What are the requirements for WinZip Self-Extractor 4.0?     Where to download WinZip Self-Extractor

RSS