woe
25th November 2006 07:54 UTC
$INSTDIR finding
Hello,
I use NSIS 2.0 for create an installer which deploy in an $INSTDIR choosed by user some files (.nsi file attached).
This path is also wroted in a registry key.
I have to create a new installer file which will deploy the same files (modified in structure). This will be an upgrade of the old program. For this purpose, I need to keep the same $INSTDIR path user choosed.
I had runned some tests and I notice the new installer automatically choosed the correct path on my local machine.
My question is: does the new installer will read by himself the registry to find the correct path to the $INSTDIR automatically or I have to wrote a new module to read/compare registry and to sugest to the user the correct path?
Hope I was clear and many appreciation for your work in this forum.
kichik
25th November 2006 09:30 UTC
The installer doesn't automatically read the registry and gets $INSTDIR from it. You must use InstallDirRegKey to tell it where to where to get the value.
demiller9
25th November 2006 13:50 UTC
Woe,
The script you posted does use the command that Kichik named, so it will read the registry and find the previous installation directory.
woe
25th November 2006 14:05 UTC
Originally posted by demiller9
Woe,
The script you posted does use the command that Kichik named, so it will read the registry and find the previous installation directory.
Thanks a lot for reply.
I think is like @demiller9 said. I supose is similar with the language choosing - if I do not uninstall the program and re-install the files over the oldest ones, the installer process trespass the language choosing step - I presume because he already read the language registry.
I think the similar will happend with the path of directory used for install which has a similar registry wroted in the previous install process.