Archive: how to modify a file and how to read the path variable


how to modify a file and how to read the path variable
i need to read out the path variable and then i´ve to write this in an bat-file. maybe someone can help me.


How's this?


ReadEnvStr $0 "Path"
FileOpen $1 "$EXEDIR\test.bat" w
FileWrite $1 "@Echo Off$\r$\nEcho $0$\r$\nPause"
FileClose $1

Yields a file called test.bat in the EXE directory which contains:

@Echo Off
Echo C:\WINDOWS\system32;C:\WINDOWS
Pause