Tuesday, May 3, 2011

Deploying Windows Forms Applications with a single exe

I have built a setup project for deploying my windows forms app. I want to take all of the files that are needed to deploy (setup.exe, whatever.msi, & prerequisites) and package them in a single self extracting archive.

Ideally the user would run this exe, it would extract files to temp directory, run setup.exe, and delete the files afterwards.

I thought I had this with WinRar, but after setup starts it complains that the msi file is missing. Winrar is deleting the temp directory before I want it to.

Can I make winrar wait before deleting the temp files? Is there another utility I can use? Is there something VS will do for me?

Thanks

From stackoverflow
  • Hi Ronnie, I've used Zip 2 Secure Exe for this and it works great. It is free

    http://www.chilkatsoft.com/ChilkatSfx.asp

    Ronnie Overby : Thank you. This was perfect.
  • You could simply write the exe yourself. Just use a zip lib to unzip an embedded resource that contains all the zipped files and then fire off the setup. Wait until it is done, then delete the extracted files and finish.

    Ronnie Overby : I thought about that, but I'm glad I found Zip 2 Secure. Much quicker than writing an app.

0 comments:

Post a Comment