Archive: A problem about shoutcut


A problem about shoutcut
How to create a short cut with an argument?

suppose that the target of the shorcut is "%Windir%\system32\rasphone.exe -d ADSL",I create it by “New→Shortcut”.I input "%Windir%\system32\rasphone.exe -d ADSL"(without the quotation marks),now the target of the shortcut is "%Windir%\system32\rasphone.exe -d ADSL"(without the quotation marks),use the follow script:

CreateShortCut “ADSL.lnk” "%Windir%\system32\rasphone.exe -d ADSL"

The target is "%Windir%\system32\rasphone.exe -d ADSL"(with the quotation marks),run it,Windows said the file is not found!after delete the quotation marks,the shorcut turns right.If the argument "-d" is quoted,it can not run.

To create a shortcut that the words in target box does not contain the quotation marks,becuse there is a argument "-d" in the target,NSIS default not.


if you read the documentation for CreateShortCut you will see that you should use
CreateShortCut "ADSL.lnk" "%Windir%\system32\rasphone.exe" "-d ADSL"