Reputation: 6446
In our project i want to zip some files. The files include an exe and a text file. Now what i need is to zip the file programatically.
Actually the exe need to run on the client machine and the text file contains some information that needed to run this exe.
So after after downloading it and on unzipping it need to execute the exe automatically.
Is there any way to do these things.
Upvotes: 1
Views: 7605
Reputation: 46040
If I understand you right, you want a ZIP file whose contents will be magically executed once the ZIP is downloaded. Luckily this is not possible due to both technical and organizational reasons.
On the other hand, you can create platform-specific (i.e. Windows-only or Linux-only) self-extracting executable which will unpack its contents and start predefined file. This is what WinZIP does (IIRC Microsoft used such archives for their PowerToys deployment).
Upvotes: 1
Reputation: 6314
If I understand your question correctly, you might be interested in Self-extracting - SFX
Upvotes: 2
Reputation: 48568
Create your own project(Winforms/WPF) in which you unzip files using DotNetZip
Library. Code in that project so that when zip file is unzipped it run unzipped exe using Process
command.
Allow user to download this project exe and zip file.
Upvotes: 2