Old 25th October 2005, 21:39   #1
WhoIAm?
Junior Member
 
Join Date: Oct 2005
Posts: 4
Question Modify Constants :P

Hey people,
i've got a strange question refering to Constants. I want to change a file depending on information given by the user (install dir). But that's not the problem.
The file i wanna change should contain a modified constant $INSTDIR. The InstallDir is like that:
C:\Program Files\TestDir\TestAPP\test.exe
The changed installdir should be like that:
C:\\Program Files\\TestDir\\TestAPP\\test.exe

Now my question. Is it possible to modify a constant like there (yeah i know, when i change this it isn't anymore a constant :P) is a additional "\" in the installdir constant??

I know it is a very special question. Thanks for Helping me out.

WhoIAm?
WhoIAm? is offline   Reply With Quote
Old 25th October 2005, 23:07   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Well... is easy

You'll have to use some of the string functions to change every "\" to "\\"...

Try the wiki and strfunc.nsh examples...


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 29th October 2005, 14:13   #3
WhoIAm?
Junior Member
 
Join Date: Oct 2005
Posts: 4
Yeah, thank you very much I've found the answer!
WhoIAm? is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump