Archive: How to change environment variables


How to change environment variables
For an installation under Win2000 I want to add some entries
in the CLASSPATH environment variable.

If this system (NOT USER !!!) environment variable does NOT exist
it should be created and the following items be added (ignore line wraps):

CLASSPATH=.;C:\programs\myprog\lib\myjar1.jar;C:\programs\myprog\lib\myjar2.jar

If the variable CLASSPATH already exists the three pathes above should be prepended (NOT appended!).

And finally if the variable exists with the pathes already assigned
nothing should happen.

How do I code this in a nsis script ?

Thank you in advance
Thomas


This script is an example for the path environment variable manipulation using NSIS:
http://nsis.sourceforge.net/archive/....php?pageid=91
It shouldn't be too hard to convert it to change the CLASSPATH.

This one just changes environment variables:
http://nsis.sourceforge.net/archive/...php?pageid=137