Archive: read registry during the compilation


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:


If you tell me what is it you are trying to do I can help you find solution for this problem.


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.


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!


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.


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:


Great :D