|
|
#1 |
|
Junior Member
|
Hey here is the problem i am having. I am trying to create a shortcut that contains a command line parameter for the exe it points to. When i run this ....
CreateShortCut "$DESKTOP\Whatever.lnk" '"C:\Test.ext" /c "MyString"' it creates the shortcut just fine except it switches the "/c" to "\c" and so link does not work correctly. Does anyone know why its switching the slashes on me and how i can fix this problem? I've also tried CreateShortCut "$DESKTOP\Whatever.lnk" '"C:\Test.ext" '/c' "MyString"' and that didnt work either. Any help you can offer would be appreciated. Thnx, Mark |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
I guess MyString is also a parameter. Then you should put both parameters into 1 string, like this:
CreateShortCut "$DESKTOP\Whatever.lnk" "C:\Test.ext" "/c MyString" -Hendri. |
|
|
|
#3 |
|
Junior Member
|
'"C:\Test.exe" /c "MyString"' (which is what ive been using) is actually one string that is contained inside single quotes. i did it that way because in the target path of the link file there are parts of the string that need to be in double quotes. If you were to right click and look at the properties of the icon, this is what should be in the target path...
"C:\Test.exe" /c "MyString" |
|
|
|
|
|
#4 | |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,336
|
The problem is that the parameters should come in a seprate string.
Quote:
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
|
#5 |
|
Junior Member
|
Thanks!
Hey thanks a lot man! Spliting up the string solved my problem. Guess i just wasnt comprehending the documentation.
|
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
Thx KiCHiK for explaining again. My solution was correct but apparently not clear to everyone. I'll be more clear next time.
-Hendri. |
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|