简体   繁体   中英

Creating a Software Installer

Long story short, I need to reinvent the wheel. Now that that's out of the way...

I'm writing an app that allows you to create your own installer for your software. I've got the UI and the ability to allow you to customize everything down, but I am getting stuck at this last part. I'm stuck where I need to pack all of your files into a single executable file so it can be distributed as a single installation file. I've not been able to find any info on this and was wondering if anybody's had any experience with it and if you could share any pointers or hints as to the right way of creating a single executable that when run, launches the "installer app" which is then responsible for unpacking the packed files and "installing" them in the correct locations?

That's what the Windows Installer API is for, you won't find better resources that than MSDN. You can also use a third-party that's been around for ages WiX there's a pretty extensive documentation/tutorial here

Did you try ILMerge

I haven't used this to build an installer but I use this tool to generate one exe combining several ddls and the exe.

There's only one installer program needed. You can embed a large binary blob (representing a single zip file) as a resource into the program. Upon running, the program just grabs the blob from memory and saves it as a .zip file in a temporary folder on disk.

The program then unzips the file and starts the install process. There's various open source .NET zip libraries that can perform the unzip step.

For the install process, copying files into the installation location may require admin privileges, and you'd need to ensure each installed file is saved with the correct permissions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM