HKFuey
asked on
Visual Studio 2013 Shortcut (VB)
I have a simple project that users install from an exe file. It creates a click-once shortcut in a folder in their all programs list.
Does anyone know how I can create a desktop click once shortcut on install?
Does anyone know how I can create a desktop click once shortcut on install?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
use %USERPROFILE%/desktop as path to get desktop path and can use vbscript to automate this
link.vbs
////////////////////////// ////////// ////////// ////////// ////////// ///////
set fs = CreateObject("Scripting.Fi leSystemOb ject")
set ws = WScript.CreateObject("WScr ipt.Shell" )
set arg = Wscript.Arguments
linkFile = arg(0)
set link = ws.CreateShortcut(linkFile )
link.TargetPath = fs.BuildPath(ws.CurrentDir ectory, arg(1))
link.Save
////////////////////////// ////////// ////////// //
command from Command prompt
C:\dir>link.vbs ..\shortcut.txt.lnk target.txt
alternatively u can use "mlink.exe" command to generate symbolic link but it file system level thing not shortcut.
symbolic links is very different beast but you can try this , :)
link.vbs
//////////////////////////
set fs = CreateObject("Scripting.Fi
set ws = WScript.CreateObject("WScr
set arg = Wscript.Arguments
linkFile = arg(0)
set link = ws.CreateShortcut(linkFile
link.TargetPath = fs.BuildPath(ws.CurrentDir
link.Save
//////////////////////////
command from Command prompt
C:\dir>link.vbs ..\shortcut.txt.lnk target.txt
alternatively u can use "mlink.exe" command to generate symbolic link but it file system level thing not shortcut.
symbolic links is very different beast but you can try this , :)
ASKER
So easy!!!! Thank you Scott.
Just open the Visual Studio. Right click on the icon in the task view and select pin to task view.
Hope it helps !