how to zip then unzip files to different directories...

dtvonly

New member
Local time
3:54 PM
Messages
10
Hi. My final project has main.exe, config.txt and template.xlsx files. I would like to somehow zip all these into one installation file such that once the user double click on it, it will extract main.exe onto the desktop; config.txt in c:\ and template.xlsx in c:\...\Documents.

Please advise. Thank you.
 

My Computer My Computer

At a glance

windows 7
Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP
OS
windows 7

My Computer My Computer

At a glance

Windows 7 Pro 32Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz4,00 GB (Usable 2,98)NVIDIA NVS 5100M
Computer type
Laptop
Computer Manufacturer/Model Number
HP Elitebook 8540p
OS
Windows 7 Pro 32
CPU
Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz
Motherboard
Hewlett-Packard 1521
Memory
4,00 GB (Usable 2,98)
Graphics Card(s)
NVIDIA NVS 5100M
Sound Card
NVIDIA High Definition Audio
Screen Resolution
1600x900
Hard Drives
INTEL SSDSA2CW120G3
Antivirus
F-Secure Internet Security
Browser
IE, Firefox, Opera
Other Info
Sandboxie,
SRP (Software Restriction Policy),
EMET (Enhanced Mitigation Experience Toolkit),
WFC (Windows Firewall Control by BiniSoft),
Malwarebytes Premium
Consider using something like NSIS to create a real installer instead, thus getting a .msi package that you then distribute. It can deploy all the files anywhere you want them and all necessary configurations. Using zip files for distribution is only good if your program is suitable for xcopy deployment (that is, everything together in a single location, or "portable" as people like to call it).

BTW, I think your desired paths are not a good choice. When deploying programs you should try to adhere to the standard of how Windows programs are installed. The main .exe goes into program files in its own folder, with a shortcut in desktop or start menu. Config file should never go into root folder (it's not user writable), it's better to put it under AppData in each user profile, and better to create it on first run instead of on-install (with the defaults parameters hardcoded into the exe for creating it). As for the templates, it depends on what purpose they serve and if they'll be modified. The program files folder or in AppData seems good places in each cases, but most likely my documents will only add clutter for the user.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64Intel Core i7-740QM8 GB DDR3NVIDIA GeForce 330GT
Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Back
Top