So, yes it’s true. Microsoft decided that the “Setup project” no longer part of the Visual Studio patterns and all of us stuck with none working,
none loading Setup project. More than that now we are missing installer for our product.
So, this post is not for the big and compose product that already didn’t use this project type, but for the medium & small product that needed simple installer
that had basic functionality as:
- File deployment
- Registry writing
- Service installation & Management
You can see that Microsoft suggest to move to “InstallShield Limited Edition” by FLEXERA, but still main features are missing (you can see here).
I used InstallShield in the past and it’s a magnificent tool and have one of the best integration with the Visual Studio and many features and great extension ability.
The only issue with it, is that it’s NOT FREE and by now we had free and satisfied installer till now.
So, I suggest to move to NSIS installer platform (you can find it here)
NSIS gives it all.
Like all installers NSIS give as all the functionality we need and more than that, the only thing that it script base installer and not so friendly.
Still for it’s cost FREE it’s more that better!!!
I want to give basic functionality that was provided by Microsoft Setup project and taken from us:
NSIS support files installation and un-installation
File “Installer Files\*.exe” : install all *.exe files under ‘Installer Files’ directory, it’s also will be the name of the directory that the file will be taken from and install into
To take and locate file from sub-folder first:
File “Installer Files\Sub-Folder\*.dll” :all dll files under Sub-Folder
NSIS support service installation, un-installation and management. For this I used the SimpleSC plug-in (for what I know it’s only works on NSIS 32bit)
Basic functionality on services:
Get Service status:
SimpleSC::GetServiceStatus “[The service name]”
Pop $0 ;Error code
Pop $1 ; service status
SimpleSC::StopService “[The service name]” 1 30
Pop $0 ; error code
SimpleSC::InstallService [name_of_service] [display_name] [service_type] [start_type] [binary_path] [dependencies] [account] [password]
Service Type (most of the time – 16)
Service Startup type (most of the time – 2)
NSIS come with default pages and page flow, and still it’s support custom pages you can define and set their on functionality.
Still there are many custom pages on the web, look for them first before creating new ones
User & Password page, there are several examples on the downloaded example folder when you installed the NSIS
This custom page will need “PassDialog.dll” see here
*** Remember all plug-ins that you want to use must be located at [Drive]:\Program Files (x86)\NSIS\Plugins (if you run on 32 bit)
NSIS can cover must of our installer requirements and more, there are many implementation for all cases (Silent installer, quick installer, etc.) and windows (Services, Registry, special parameters, etc.)
Just look for it