lll2008
24th September 2003 23:31 UTC
InstallDirRegKey does not work for me.
I am a new user of NSIS (just started to play with it today). I used:
InstallDirRegKey HKLM "SYSTEM\CurrentControlSet\Control\ServiceProvider\ServiceTypes\Microsoft Internet Information Server" ""
or
HKLM "SYSTEM\CurrentControlSet\Control\ServiceProvider\ServiceTypes" "Microsoft Internet Information Server"
to check if iis has been installed, but neither worked for me. I am sure the key is there! I also tried to add a key to SOFTWARE, and InstallDirKey did not work for me either. Please refer to my script file (attached).
Could you tell me what the problem is? Or any suggestion on this?
Thank you in advance!
li
Vytautas
25th September 2003 00:29 UTC
Which version of NSIS are you using?
Vytautas
lll2008
25th September 2003 14:55 UTC
Hi Vytautas, I am using NSIS 2.0 Beta 3a - Released March 15, 2003.
Joost Verburg
25th September 2003 16:02 UTC
What exactly do you want to do? InstallDirRegKey gets a folder from the registry.
lll2008
29th September 2003 15:36 UTC
Hi Joost,
I am trying to check if iis is installed before I install my components. I suppose if the iis key is there InstallDirRegKey HKLM "SYSTEM\CurrentControlSet\Control\ServiceProvider\ServiceTypes\Microsoft Internet Information Server" "" will return a folder to INSTDIR, otherwise INSTDIR will be empty. But apprently this does not work for me. Even though the key is there, the InstallDirRegKey still returns an empty string. Please check the attachement in my first post.
Any suggestion?
Thanks,
kichik
29th September 2003 15:43 UTC
Are you sure it contains a valid directory path? If it doesn't contain a valid directory path, nothing will get into $INSTDIR. If you want to read this value, which is not a directory path, you should use ReadRegStr and not InstallDirRegKey.
BTW, you can use RegDLL instead of executing regsvr32 which doesn't exist on every Windows machine.