I have a .property file in my Java project. In that property file have more than 20 values. Now I want to parse that property file and change the specific property value at run time(that is when run the install file). I have used following code
Section
${ConfigWrite} "C:resource\conf.properties" SET WEBSERVICE.URL=http://localhost:8080 $R0
;$R0=CHANGED
SectionEnd
After running exe file ,the property added in property file like this
SETSERVER.URL=http://localhost:8080
I don’t know why the SET words comes before this variable?
My requirements:
-
I need to give value for SERVER.URL property at run time (while installing the exe file)?
-
I need to replace the value of SERVER.URL property.but Using above added one more new property in that file.
I have used NSIS plugin in Eclipse on Windows platform.
You are missing some quotes when calling the macro, also there is no need to specify
SET(in the example from help,SETis actually part of a command in a DOS batch file), and I guess that it is better to add a backslash to the path after the disk drive.The doc states that the syntax is:
Therefore your call must be:
Note how the parameters are splitted between the parameter name
WEBSERVICE.URLand the value=http://localhost:8080(note the equal sign at the beginning).You can make the directories dynamic too: