Archive: WriteEnvStr?


WriteEnvStr?
Hi, am i missing something obvious?

I can't found something to set an envirment string. There are ExpandEnvStrings and ReadEnvStr but how do I set an enviroment string?

cheers,
Tao


http://nsis.sourceforge.net/archive/...php?pageid=161

-Stu


I'm fuzzy on how to actually invoke the system.dll plug-in. The link shows this:

ReadEnvStr $R0 "PATH"
StrCpy $R0 "$R0;C:\MYAPP"
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i(PATH, $R0).r0'

When I try something very similar, nothing seems to happen. Is there something else I need to do in my script to let the system.dll plug-in be used?

The following doesn't cause an environment variable TEST_TEMP to be created:

Function .onInstSuccess
ReadEnvStr $R0 TEMP
MessageBox MB_OK "MyApp \
$\r$\nTemp-Variable = $R0 "

System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("TEST_TEMP", $R0).r0'

FunctionEnd

How do I have the environment variable TEST_TEMP be created with the value of the actual TEMP variable?

I looked at the top of the compiler output, and system::call was shown.