Version 18, last updated by markcopenhaver at July 31, 2010 01:15 UTC
NSIS Generic Component Installer
If your component consists only of files which need to be placed, and optionally registered for COM, in either the program directory, the system directory, or the GAC, then the NSIS Generic Component Installer can be used to created an executable setup program. To use the NSIS Generic Component Installer, follow these steps:
1. Download and install the NSIS system. You can get directly from its SourceForge download site here: http://nsis.sourceforge.net/Download
2. Create a folder and place the following files in it:
NSISGenericComponentInstaller.nsi
EncounterPRO.OS.CSharpGACTool.exe
3. Create the following subfolders, as needed:
| Files placed in this subfolder | Will end up here when the setup executable is run |
| Files | EncounterPRO-OS Program Directory |
| RegFiles | EncounterPRO-OS Program Directory, with registration for COM/Interop |
| GAC | Global Assembly Cache |
| GACReg | Global Assembly Cache, with registration for COM/Interop |
| Sys | Windows System Directory |
| SysReg | Windows System Directory, with registration for COM/Interop |
Note that you do not need to create a subfolder if it will have no files in it. When all of the needed subfolders are created and all of the files are in the appropriate subfolder, then open a command prompt, set the current diectory to the parent folder (the one with all the subfolders in it) and run the following command:
"C:\Program Files\NSIS\makensis.exe" /DName="<Component Name>" /DVersion=<Version> "NSISGenericComponentInstaller.nsi"
,,, replacing the <Component Name> with actual component name, and <Version> with the version of the main assembly (or whatever version you want to call it).
Note that if you are on a 64-bit computer or you installed NSIS to somewhere other than its default location, then you may need to also change the path of makesys.exe. On a 64-bit system, the default path is "C:\Program Files (x86)\NSIS\makensis.exe".
When the MakeNSIS program finishes, you should have a nice shiny new component installer. Go ahead and run it. It may ask you to approve running it depending on your OS and security settings. It should end up with an “Installation Complete” window. Now check your GAC to see if your assembly is there (the GAC is usually c:\windows\assembly).
For the next step you are going to need the full display name of the assembly. When you find your assembly in the GAC, click on it to select it, and press ctrl-I on the keyboard. That will put the display name onto your clipboard. You can also hover the cursor over it and the popup tooltip is the display name. It should look something like this:
myNewEproService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db8dddc6250e43a4, processorArchitecture=MSIL