Skip to content
⌘ NSIS Forum Archive

Need help with url shortcuts

6 posts

geoffrey_4js#

Need help with url shortcuts

Hi,

I'm a NSIS newbie and I'm facing a problem.

I want to install an url shortcut in the startmenu but it doesn't work. If I create it on the desktop or a place on the harddrive, it works.

I've try with :

WriteIniStr    "$STARTMENU_FOLDER\test.url" "InternetShortcut" "URL" "URL=http://nsis.com"
Lobo Lunar macro

Name "Create Internet Shorcut"
OutFile "makeURL.exe"

!Macro "CreateURL" "URLFile" "URLSite" "URLDesc" "WhereFile"
WriteINIStr "${WhereFile}\${URLFile}.url" "InternetShortcut" "URL" "${URLSite}"
SetShellVarContext "current"
CreateShortCut "${WhereFile}\${URLFile}.lnk" "C:\${URLFile}.url" "" "$EXEDIR\makeURL.exe" 0 "SW_SHOWNORMAL" "" "${URLDesc}"
!macroend

Function ".onInit"
!insertmacro "CreateURL" "TEST URL" "http://nsis.sf.net" "Visit NSIS Development Site" "$STARTMENU_FOLDER"
MessageBox MB_OK "Done"
Quit
FunctionEnd

Section "-boo"
;
SectionEnd
And none of these seems to work.

Thanks in advance for your help.

Geoffrey
superwan#
	CreateShortCut  "$SMPROGRAMS\K!TV\$(sitekastor)" "http://www.kastortv.org" "URL" "" "" "" "" "$(desktvorg)"
geoffrey_4js#
This doesn't work neither superman. In fact i've try this (find on an older topic) :
 WriteINIStr "$SMPROGRAMS\Test\Page.url" \
"InternetShortcut" "URL" "http://quantlib.org/"
It works but $SMPROGRAMS\Test have to exist.

Thx.

Geoffrey