Archive: Installer development using Windows 7


Installer development using Windows 7
I develop/maintain an installer for a ham radio application, BPQ32, using Windows XP, but now need to advance to Windows 7. The first thing I notice after installing NSIS on Windows 7 64 bit is that unlike Windows XP, where upon right clicking a file with a .nsi extension Windows Explorer offers the option 'compile NSIS script, is that this does not occur in Explorer for Windows 7. That was a very convenient feature and I will really miss it.

Might this relate to the location used for the installer development files, which raises the question also is there a preferred location for them. In Windows XP I had them in c:\program files\NSIS\BPQ32, which would be inappropriate for Windows 7.

Is there by chance a good source to review for assistance for installer development in Windows 7? I am sure UAC will be an issue, perhaps also differences needed for 64 bit installs. I probably should have kept this post to a single topic!


1) Context menu should work in win7 as well. This problem has been reported before, http://forums.winamp.com/showthread.php?t=315798 Not sure how to fix it. Try installing at userlevel to a location that doesn't require admin access?
2) UAC isn't an issue as long as you add the requestexecutionlevel command. If your installer needs admin access, use requestexecutionlevel admin AND use the userinfo plugin to verify admin access. If your installer doesn't need admin access, use requestexecutionlevel user.
3) To differentiate between 32 and 64 bits OS use the macros in x64.nsh.


I have Win7 x64, too. I never noticed it missing because I invoke the compile from my editor, not from the context menu. You can easily add it back with a simple registry entry. Edit the path to your NSIS installation if different.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\NSIS.Script\Shell\Compile]
@="Compile with NSIS"

[HKEY_CLASSES_ROOT\NSIS.Script\Shell\Compile\Command]
@="C:\\Program Files (x86)\\NSIS\\makensis.exe \"%1\""

Originally posted by Collector9999
I have Win7 x64, too. I never noticed it missing because I invoke the compile from my editor, not from the context menu. You can easily add it back with a simple registry entry. Edit the path to your NSIS installation if different.
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\NSIS.Script\Shell\Compile]
@="Compile with NSIS"

[HKEY_CLASSES_ROOT\NSIS.Script\Shell\Compile\Command]
@="C:\\Program Files (x86)\\NSIS\\makensis.exe \"%1\""
it's so simple, it doesn't even work. wait, maybe that's for the same reason the installer failed to do the same? :stare:

luckily, you can still use that stupid sendto menu

The registry entries above show ..\makensis.exe but should actually be ..\makensisw.exe. That is not the problem however. The NSIS install made the same entries in Windows 7 just as it did in Windows XP, with the inclusion of "x(86)" in the path for Windows 7 of course.

So there is something else wrong. Hopefully someone who knows what is wrong will provide a solution.


Following MSG's suggestion, I uninstalled NSIS and reinstalled in c:\NSIS. I rebooted just to be sure afterwards. The option to compile is still missing from the context menu in Windows Explorer. You said "Try installing at userlevel to a location that doesn't require admin access?", have I done what you suggested, or have I misunderstood this?


If you have UAC enabled:
- If you didn't get a UAC popup at any point then yes, you installed at userlevel.

If you have UAC disabled:
- If you're a member of the admins group you installed at admin level. You're a member of admins if you can, for example, create a new file in the Program Files directory.


I have UAC enabled and I didn't get a UAC popup at any point while installing at c:\NSIS. Windows Explorer does not have the desired context menu, however I can use the less convenient drag and drop method. It would be nice if this convenient context menu feature could be enabled.

An alternative is apparently to invoke the compile from an editor. Which editor? Does HM NIS Edit provide this feature?

As to if my installer will require admin access, I need to install a DLL in c:\windows\system32 so I should think it would.

You speak of perhaps my needing the macros in x64.nsh. The program suite for which I am providing the installer is 32 bit only. So will I need to use macros in x64.nsh at all?


could all this be caused by a conflict between 32bit and 64bit registry? unfortunately my regmon doesn't work, otherwise i'd take a look how the installer for notepad++ install itself to the context menu.