Old 28th May 2003, 13:55   #1
banaman8d
Junior Member
 
Join Date: May 2003
Posts: 19
Thanks for the suggestion SJ,

I decided to do just that. This is the general idea of what I am doing:

; Function to interpolate 'special' values into strings.
; input: $R0
; output: $R0
; error: none set
; This will probably change so that it uses the stack.
Function Interpolate
Push $R1

; Interpolate Program Files location into string
nsmys::SearchAndReplace $R0 "{PGMFILES}" "$PROGRAMFILES"
Pop $R1 ; Get value from SearchAndReplace
StrCmp $R1 "error" +2 0
StrCpy $R0 $R1 ; replace old string with interp'ed

; Interpolate Desktop values
nsmys::SearchAndReplace $R0 "{DESKTOP}" "$DESKTOP"
Pop $R1
StrCmp $R1 "error" +2 0
StrCpy $R0 $R1

.
. ; Do other interpolations
.

Pop $R1
FunctionEnd
banaman8d 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