Get the new PortableApps.com Platform 10.0: Gorgeous themes, a full portable app store and advanced functionality
Announcing the World's Best Flash Drive: The PortableApps.com Companion | Did you see a malware warning on Friday?

Clear Variable in NSIS

3D1T0R - March 6, 2007 - 8:40pm

i must be missing something important in NSIS Var command.
Var
[/GLOBAL] var_name
Declare a user variable. Allowed characters for variables names: [a-z][A-Z][0-9] and '_'. All defined variables are global, even if defined in a section or a function. To make this clear, variables defined in a section or a function must use the /GLOBAL flag. The /GLOBAL flag is not required outside of sections and functions.

Var example

Function testVar
Var /GLOBAL example2

StrCpy $example "example value"
StrCpy $example2 "another example value"
FunctionEnd

but i cant make it clear the variable
ive tried Var /GLOBAL 1
ive tried Var /GLOBAL $1
ive tried alot of things and i just dont understand it

could anyone help me?
Please???


( categories: )

Easy

Var example
Var example2
Function testVar
StrCpy $example "example value"
StrCpy $example2 "another example value"
StrCpy $example "" ;This clears the variable.
FunctionEnd

You forgot to declare example2 BTW.
----
Ryan McCue
Current Fav. Songs:

  • Ballroom Blitz - The Misfits
  • Manic Monday - Cyndi Lauper
  • I Don't Like Mondays - The Boomtown Rats

"If you're not part of the solution, you're part of the precipitate."