dotnetzip - Is it possible to create a self-extracting archive which will run a specific file when unzipped? -


For example, I want to deploy an application containing setup.exe to remove itself When the user completes the collection of automatic removal, then it will open the contents in the temporary folder and run setup.exe.

Is this possible? If so, any example?

Yes, this is the thing you can do with DotNetZip .

The Doctor page provides an example.

  string directory = "c: \\ document \\ project7"; (Zipfile zip = new zip file ()) is using {zip.AddDirectory (DirectX, System.IO.Path.GetFileName (DirectX)); Zip Comment = "This will be embedded in a self-extracting WinForms-based exe; Var option = new selectlectors servicing {flavor = sloptector flavor. Winfurs app, default extract directory ="% USERPROFILE% \\ Extract ", Post Extract Commandline = ExtoOrne Fitter Extract, SFX AccessWindow = "My Custom Window Title", RemoveApackFilesAuthorExecute = True}; Zip.SaveSelfExtractor ("archive.exe", option);}    

Comments