Archive: Evil Create Shortcut Quotes Please Help.


Evil Create Shortcut Quotes Please Help.
here is what is have going on
CreateShortCut "$SMPROGRAMS\PrositeXL\Apache1.3\Restart Apache1.3.lnk" "$INSTDIR\Apache\Apache.exe$\" -w -n $\"Apache$\" -k restart" "" "$INSTDIR\Apache\Apache.exe" 0

all i'm trying to do is recreate a shortcut to restart apache

here is what it is suspose to look like
"C:\Program Files\Apache Group\Apache\Apache.exe" -w -n "Apache" -k restart
when it winds up in the shortcut Link

but i have tried all kinds of crap to try to get this right
and I have turned now to you wonderfull people :)

here are the results that I have been getting back from it

what it should be
"C:\Program Files\Apache Group\Apache\Apache.exe" -w -n "Apache" -k restart

What i have
"C:\"C:\Program Files\PrositeXL\Apache\Apache.exe" -w -n "Apache" -k restart"

2nd time
"C:\"C:\Program Files\PrositeXL\Apache\Apache.exe" -w -n "Apache" -k restart"

3rd time
"C:\Program Files\PrositeXL\Apache\Apache.exe -w -n Apache -k restart"

4th time
"C:\"C:\Program Files\PrositeXL\Apache\Apache.exe" -w -n "Apache" -k restart" "

and if i Use ' it winds up comming out '
it's acting like you can only have so many $\
and there placement to me I thauhgt i had down pat
but now has become like the rubiks cube
Depending on where i place them
they wind up showing up or not :( ?
:cry:
ACK! Please someone Show me what it's suspose to look like ?
it's been able to work differntly and perfectly throught out the entire script till now ????????

But the other stuff using File write and other things work fine for me.


The problem maybe are the quotes. Try this:

CreateShortCut \
"$SMPROGRAMS\PrositeXL\Apache1.3\Restart Apache1.3.lnk" \
"$INSTDIR\Apache\Apache.exe" \
`-w -n "Apache" -k restart` \
"$INSTDIR\Apache\Apache.exe" \
0

Parameters should be in one separate string, see the FAQ.


So I can segment the shortcut line by line ?

Are there certin rules I need to folow when segmenting
the string line by line ?

Thank you deguix
that example worked perfect for me.


You can find information about splitting up lines in the manual. You should put a \ at the end of a line.


Thank you deguix
that example worked perfect for me.

I noticed somthing funky that you did and was wondering about it for somtimes this morning.
And here is the section i need answers on

;this part is fine i understand this
CreateShortCut \ ;this part looks like it is a carry over
;this part is the seperate of the $SMPROGRAMS
"$SMPROGRAMS\PrositeXL\Apache1.3\Restart Apache1.3.lnk" \
"$INSTDIR\Apache\Apache.exe" \
;---------------------------------------
;this part is what is confusing to me
`-w -n "Apache" -k restart` \

;it's the ` symbol and how it's used.
;It looks like anything within the ` `

is that like using the
{
}
in C++ or php or like sub end sub in vb ?
it looked as if that was a opening and closing of that
section with the ` ` ?

Thanx for all the help


Here is what I have tried compared to your Example to fix the
same kind of problem using the ` and the \
in conjunction but I can figure out what I'm doing wrong and where ? are there specific rules to this ?
Mabey someone can tell me where I'm Going worng with it
Please.

Here is the error code I'm getting
;--------------------------------------------
\Apache1.3.lnk"->"$INSTDIR\Apache\Apache.exe" icon:$INSTDIR\Apache\Apache.exe,0, showmode=0x0, hotkey=0x0, comment=
CreateShortCut: "$SMPROGRAMS\PrositeXL\Apache1.3\Edit the Apache httpd.conf Configuration File.lnk"->"$INSTDIR\Apache\conf\httpd.conf" icon:$INSTDIR\Apache\Apache.exe,0, showmode=0x0, hotkey=0x0, comment=
CreateShortCut expects 2-8 parameters, got 9.
Usage: CreateShortCut shortcut_name.lnk shortcut_target [parameters [icon_file [icon index [showmode [hotkey [comment]]]]]]
showmode=(SW_SHOWNORMAL|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED)
hotkey=(ALT|CONTROL|EXT|SHIFT)|(F1-F24|A-Z)
Error in script "C:\Program Files\NSIS\Examples\Modern UI\Modern PrositeXL.nsi" on line 144 -- aborting creation process
;------------------------------------------------

It's wigging on the Icon Index as if i missed a parameter
somewhere in the line that's not letting in complete ?


Examples that are giving the error code
;--------------------------------------------
;CreateShortCut \
;"$SMPROGRAMS\PrositeXL\Apache1.3\Test Configuration.lnk" \
;"$\"$INSTDIR\Apache\Apache.exe$\" \
;`-w -t -f "$INSTDIR\Apache\conf\httpd.conf" -d "$INSTDIR\Apache" \
;"$INSTDIR\Apache\Apache.exe\" \
;0

;CreateShortCut \
;"$SMPROGRAMS\PrositeXL\Apache1.3\Test Configuration.lnk" \
;"$INSTDIR\Apache\Apache.exe" \
;`-w -t -f' \
;"$INSTDIR\Apache\conf\httpd.conf" \
;`-d` \
;"$INSTDIR\Apache" \
;"$INSTDIR\Apache\Apache.exe\" \
;0

CreateShortCut \
"$SMPROGRAMS\PrositeXL\Apache1.3\Test Configuration.lnk" \
"$INSTDIR\Apache\Apache.exe" \
`-w -t -f` \
`"$INSTDIR\Apache\conf\httpd.conf"` \
`-d` \
`"$INSTDIR\Apache`" \
"$INSTDIR\Apache\Apache.exe\" \
0:igor: :igor: :igor:


Put quotes around a parameter like:

'-w -t -f "$INSTDIR\Apache\conf\httpd.conf" -d "$INSTDIR\Apache"'

(note the single quote at the end)


Error: unterminated string parsing line at C:\Program Files\NSIS\Examples\Modern UI\Modern PrositeXL.nsi:141
Error in script "C:\Program Files\NSIS\Examples\Modern UI\Modern PrositeXL.nsi" on line 141 -- aborting creation process

135:
136:CreateShortCut \
137:"$SMPROGRAMS\PrositeXL\Apache1.3\Test Configuration.lnk" \
138:"$INSTDIR\Apache\Apache.exe" \
139:`-w -t -f "$INSTDIR\Apache\conf\httpd.conf" -d "$INSTDIR\Apache"' \
140:"$INSTDIR\Apache\Apache.exe\" \
141:0
142:

Corrected but missing a termination string on the Icon index ?


You should put the same quote at the beginning and the end of that line (139). So either use ` or '.


Jost check this out this is sweet I figured somthing out
using your thing in combination with somthing.


what it should be
"C:\Program Files\Apache Group\Apache\Apache.exe" -w -t -f "C:\Program Files\Apache

Group\Apache\conf\httpd.conf" -d "C:\Program Files\Apache Group\Apache\"

What i have

"C:\Program Files\PrositeXL\Apache\Apache.exe" -w -t -f "C:\Program

Files\PrositeXL\Apache\conf\httpd.conf


This Begins the Section ` and this ends the section ` \
this will rem out from the compiler sections and allow for massive crazy input :)

Because with this
CreateShortCut \
"$SMPROGRAMS\PrositeXL\Apache1.3\Test Configuration.lnk" \
"$INSTDIR\Apache\Apache.exe" \
`-w -t -f "$INSTDIR\Apache\conf\httpd.conf" \
-d "$INSTDIR\Apache"' \
"$INSTDIR\Apache\Apache.exe\" \
0 ` \

I got this

"C:\Program Files\PrositeXL\Apache\Apache.exe" -w -t -f "C:\Program

Files\PrositeXL\Apache\conf\httpd.conf" -d "C:\Program Files\PrositeXL\Apache"' "C:\Program

Files\PrositeXL\Apache\Apache.exe\" 0

and with this
CreateShortCut \
"$SMPROGRAMS\PrositeXL\Apache1.3\Test Configuration.lnk" \
"$INSTDIR\Apache\Apache.exe" \
`-w -t -f "$INSTDIR\Apache\conf\httpd.conf" \
-d "$INSTDIR\Apache\" ` \
"$INSTDIR\Apache\Apache.exe\" \
0

I got this

"C:\Program Files\PrositeXL\Apache\Apache.exe" -w -t -f "C:\Program Files\PrositeXL\Apache\conf\httpd.conf" -d "C:\Program Files\PrositeXL\Apache\"

So this ` and ` \ act like beginning and closing Rem from the compiler thinking it's
actually anything within those 2 things are anything more then just text.
Sweeeeeeeet.
Thanx deguix and Jost for all your help on this one :)
the coolest thing was the ` \ anything after that the compiler acted like normal and picked up the rest of the code Imediatly after that :)