Archive: help an NSIS newbie :)


right, ive just started using NSIS to act an installer for custom patches for the Ultima Online Shard that i work for and weve recently released patches that all players need. ONly many have had problems not knowing where to install them so ive been looking into using NSIS to install them.

What ive had problems with is setting the install dir using the registry.
the key im trying to use is in HKEY_LOCAL_MACHINE\Software\Origin Worlds Online\Ultima Online\1.0 and is stored in the "ExePath" box.
My problem being is i cant get NSIS to recognize the reg key, i think im entering it wrongly so if someone cold help me i would be very grateful :)

This is what ive currently got it as:
; The default installation directory
InstallDir "$PROGRAMFILES\Ultima Online"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey "HKEY_LOCAL_MACHINE\SOFTWARE\Origin Worlds Online\Ultima Online\1.0" "ExePath"

im fairly sure its wrong, but being a newbie ;) id be very grateful if someone could correct it for me.

Many thanks


InstallDir "$PROGRAMFILES\Ultima Online"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Origin Worlds Online\Ultima Online\1.0" "ExePath"


You need to split the HKEY and actual content. Though I'm not sure if you have to remove the \ before software, but you can check this by trying.


exellent, thank you very much :E
il go give it a try


Always Read FAQ's docs and so on before asking...
As I said in the title: Always Read FAQ's docs and so on before asking...