|
|
#1 |
|
Junior Member
Join Date: Mar 2012
Posts: 6
|
Concatenate colon
How can to concatenate variable with colon?
$1 = A $2 = B StrCpy $3 "$1:$2" I want to result A:B, but out AB |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
You're mistaken. StrCpy $3 "$1:$2" is the correct command. If $1 is A and $2 is B, the output to $3 will be A:B .
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2012
Posts: 6
|
I use NSIS 2.46 and that version crop the colon. The output is AB.
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
Some variables are special ($instdir etc) and will strip things that are not valid paths, $3 is normal and strcpy will not strip anything.
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2012
Posts: 6
|
ok, so how can I add colon with the variable $INSTDIR
like this: $1 = localhost $2 = 123 $INSTDIR\proxy.exe --address=localhost:123 |
|
|
|
|
|
#6 |
|
Major Dude
|
That cannot be done!
Use nsExec, ExecWait or similar way to execute application with your desired parameters. Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2022: www.visual-installer.com or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2012
Posts: 6
|
|
|
|
|
|
|
#8 | |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Quote:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3.4 |
|
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Mar 2012
Posts: 6
|
Quote:
${NSD_GetText} $SERVER_HOST $1 ${NSD_GetText} $SERVER_PORT $2 StrCpy $3 "$1:$2" ${NSD_GetText} $PROFILER_PORT $4 StrCpy $4 "127.0.0.1:$4" CreateShortCut \ "$SMPROGRAMS\Proxy.lnk" \ "$INSTDIR\proxy.exe --proxy-address=$4 --proxy-backend-addresses=$3" \ "" \ "$INSTDIR\proxy.ico" \ 0 In result: proxy.exe --proxy-address=127.0.0.1PORT --proxy-backend-addresses=SERVERPORT no colon between address and port |
|
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Please check the link MSG provided. Command line arguments are specified as a separate argument for CreateShortCut.
Stu |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Mar 2012
Posts: 6
|
yes, it resolved:
CreateShortCut \ "$SMPROGRAMS\Proxy.lnk" \ "$INSTDIR\proxy.exe" \ "--proxy-address=$4 --proxy-backend-addresses=$3" \ "$INSTDIR\proxy.ico" \ 0 thanks a lot! |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|