Archive: Put a Environment variable


Put a Environment variable
Hi
I need put a environment variable in my sistem. I download the examples for this problem but I dont understand where make this change.
I put this lines into my nsi:

Section "Add to path"
Push $INSTDIR
Call AddToPath
SectionEnd

and after I put the next file:

!verbose 3
!include "WinMessages.NSH"
!verbose 4

; AddToPath - Adds the given dir to the search path.
; Input - head of the stack
; Note - Win9x systems requires reboot

Function AddToPath
Exch $0
Push $1
Push $2
Push $3

# don't add if the path doesn't exist
IfFileExists $0 "" AddToPath_done
.......................................................


Well, I want create new environment variable

(xxxx_apps) ; c:\xxxx\bin

Which's the line code when I make change?

Thanx


I'm sorry but I new nsis programmer.


Hi vitantonio :) !

Could you explain a bit more what you would like to do ? As far as I understand you want to set a system variable, but :

1) Do you want this variable to be cleared after the installer quits or do you want the variable to remains ?

2) What is the name of your variable ?

3) What should be the variable's value ?

4) Could you attach the script ? It would be easier :D


evilO/Olive


hi evilO

1) yes I want when this variable remains into system after the installer
2) the name is otto_apps
3) value is c:\otto\bin
4) the script is attach in my nsi principal file

Thanx


4) Could you attach the script ?
I meant : when posting a reply, use "Attach file" (below the nice smileys), browse your hard drive, select the script, click on the "open" button, so I can download the script from your post and check it...

evilO/Olive