Search code examples
c#asp.netzipexeunzip

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.


Solution

  • 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).