Domanda

I have created a WPF application. I want to make installer file (exe) for this application.

This application also uses some other 3rd party files (bat files); which i have zipped. I want to unzip this file while installing and set the path of unzipped dir in Path variable also.

I got a link http://www.msdotnet.co.in/2012/06/how-to-create-setup-fileexe-file-from.html#.U3GT7YGSzxp which tells how to create a installer file.

How to achieve unzipped part and setting environment vairable while making installer?

Thanks

È stato utile?

Soluzione

Take a look at wix from Microsoft.

It can be run standalone, but is great run from within visual studio. You write a small xml file detailing what you want installed, and it does the rest.

To run a zip command, use a CustomAction.

Altri suggerimenti

Search for Install-shield. It is old tool but having good scripting capability like what you are expecting (i.e) Unzipping the folder and dealing with path environment variable

Use Inno Setup (http://jrsoftware.org/isinfo.php) or NSIS (http://nsis.sourceforge.net/Main_Page).

Both are free (open source) installation systems with many possibilities and huge community around (even here on SO).

They are really easy to use (especially Inno) and they are powerful so it is easy to achieve your required functionality.

Take a look at Stall:

https://github.com/jamesqo/Stall

It's an OSS project that lets you install your app from the command line, no configuration required.

Example Usage:

stall path/to/YourApp -e YourApp.exe -i YourApp.exe

This installs your app straight to the user's computer without having to make an intermediary MSI.

If you have to unzip files as well, you may want to just consider a simple batch files that downloads the binaries + unzips the contents + runs Stall.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top