Winzip self extractor - Define current user

Soldato
Joined
12 Jan 2006
Posts
5,610
Location
UK
Hi

I am creating a CD with a zip file which will self extract.

I want it to extract into the users my documents folder without them having to select it manully.

Does anyone know how to define the current user so win zip knows where its looking?

I have checked %username% but it doesn't work.
 
There may be a better answer but the only way I can think of is to read the registry HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal and use that so you'll need to wrap the zip in something like vbs to pass the current users My Docs folder location.
 
Thats a good point lol, put the wrong one in. Try %USERPROFILE%\my documents or %HOMEPATH%\my documents.

Again these would only work if My Documents hasn't been moved, for example for my user My Documents is set to D:\Work so the above won't work. Safest way is to emcompass the extraction in say a VBS file that checks the users setting via the registry and then extracts the files using this folder location as a command line parameter.
 
Back
Top Bottom