david33470
23rd August 2002 12:55 UTC
read registry during the compilation
Hello!!
when you put a line with "ReadRegStr ..." on a script,the line is executed when you launch the executable file creating by compiling the script and not when you compile the script!!!
Is there any solution to execute such a line when I compile the script?
Tank you.:confused:
kichik
23rd August 2002 13:34 UTC
If you tell me what is it you are trying to do I can help you find solution for this problem.
Sunjammer
23rd August 2002 14:11 UTC
KiCHiK - I think we need a marker in the documentation to say which commands are compile time commands and which are runtime commands. A lot of people fall foul of this distinction.
david33470
23rd August 2002 16:27 UTC
ok
In fact i have an installation script whith a lot of section an subsection and for the uninstallation i made another nsi script, and i want to guive a value to the uninstalation script before compiling it to know where to find in the registry what it need. i think that the best solution is a key in the registry, but i can have several version of my software on a pc so if i install a second version i have to be able to uninstall the first and the second version too.
so the key should be a value that depend of the version of my software, so i have to give the value when i compile the script of the uninstal part (in fact i compile this script when i install the software) .
i hope that we have a solution for me to read the reg value when i compile the script, if you have understand my bad english (sorry but I'm french).
tank you!
kichik
24th August 2002 05:21 UTC
I don't quite understand where is it that you compile the script, but however you do it, just add /DREGKEY=myregkey to the makensis command line so you will have a define named REGKEY with the value of myregkey which can be a variable if you compile from another installer.
Sunjammer, there is a pretty clear speration in the documents between instructions and compiler flags/installer attributes.
david33470
26th August 2002 09:37 UTC
ok
Tank you very much what you say to me help me a lot and my problem is now resolved.
:up: :up: :up: :up: :up: :up: :winamp: :up: :up: :up: :up: :up:
kichik
26th August 2002 11:33 UTC
Great :D