Mahesh KP
Mahesh KP

Reputation: 6446

Execute an exe on unzipping the zip

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

Answers (3)

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

mox
mox

Reputation: 6314

If I understand your question correctly, you might be interested in Self-extracting - SFX

Upvotes: 2

Nikhil Agrawal
Nikhil Agrawal

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

Related Questions