Skip to content
⌘ NSIS Forum Archive

Creating a .lnk that launches Windows Explorer with parameters ...?

4 posts

Bansaw#

Creating a .lnk that launches Windows Explorer with parameters ...?

I want to create a lnk in the start menu to launch windows explorer with parameters.
Here's what I am using:

CreateShortCut "$SMPROGRAMS\VMS Images\Open Images folder.lnk" "$WINDIR\explorer.exe /root,c:\VMS images"

Its not working, although it works fine from the Cmd prompt.

Does NSIS complier not like the forward slash or something else?

thanks,,
Bansaw#
thanks

When I look at the .lnk it creates, its properties, I see that two characters are not coming out:

The colon : after C so C:\ becomes C\

the forward slash before root is also not coming out.
Bansaw#
I got it, - the parameters MUSt be in a separate string completely from the string.

So, this won't work:
CreateShortCut "$SMPROGRAMS\VMS Images\Open Images folder.lnk" "$WINDIR\explorer.exe /root,c:\VMS images"

But this will:
CreateShortCut "$SMPROGRAMS\VMS Images\Open Images folder.lnk" "$WINDIR\explorer.exe " "/root,c:\VMS images"