/build/static/layout/Breadcrumb_cap_w.png

Silently creating Desktop Shortcuts

I have an application that is installed on the network and I need to silently deploy desktop shortcuts to users. The shortcut point back to the app on the network. I tried to copy the shortcut icon in the network drive to "c:\document and settings\all users\desktop"; unfortunately the icon does not copy.

Any suggestions?

0 Comments   [ + ] Show comments

Answers (14)

Posted by: dadman53 14 years ago
Senior Yellow Belt
0
Got a sample of your code handy? It's hard to guess with nothing to go on. I've used VB to successfully create shortcuts in all users desktop. If you are using VB let me know.
Posted by: williasa 14 years ago
Senior Yellow Belt
0
Unfortunately I'm not using VB. Never been good at it.
Posted by: timmsie 14 years ago
Fourth Degree Brown Belt
0
so what are you using?
Posted by: williasa 14 years ago
Senior Yellow Belt
0
Simple batch file.

copy "P:\apps\XXX\XXX.exe" "c:\document and settings\all users\desktop"

the "XXX.exe" is the shortcut.
Posted by: timmsie 14 years ago
Fourth Degree Brown Belt
0
should be
c:\documents and settings\all users\desktop
Posted by: williasa 14 years ago
Senior Yellow Belt
0
You are right.. I mistyped. It was Documents and Settings
Posted by: anonymous_9363 14 years ago
Red Belt
0
1, An EXE isn't a shortcut
2, Who on earth decided that the Desktop was a good place to put shortcuts? What is the Start menu for, if not for shortcuts?
Posted by: williasa 14 years ago
Senior Yellow Belt
0
1. With Best Case (the program I am using), winbfs.exe is the file needed to access the network app. (the properties point to the network location)

2. my company wants this particular short cut on the desktop
Posted by: williasa 14 years ago
Senior Yellow Belt
0
I know the usual shortcut is a .lnk or .ico. This not the case here.

I need to create a short cut which points to the start up.exe. silently. (deployed using SCCM) for a large numbers of pcs.
Posted by: tabbabu 9 years ago
White Belt
0
i have created a shortcut using below command line:

copy "P:\apps\XXX\XXX.exe" "c:\document and settings\all users\desktop"

on launching the desktop shortcut its shows an error message that the application had stop working. 
Posted by: anonymous_9363 14 years ago
Red Belt
0
I'm not using VB. Never been good at it.There's a post which has been active today which has ready-rolled code for you. All you need to do is edit the details.
Posted by: williasa 14 years ago
Senior Yellow Belt
0
At the risk of being b-slapped for stupid questions, let me ask, where can I locate this info?

I think I've posted on this message board twice and I'm not sure of where info is.
Posted by: dadman53 14 years ago
Senior Yellow Belt
0
Try adding this VB script if you want a shortcut on your All Users Desktop. You will need to modify it to point to your startup.exe. This creates a shortcut and doesn't just copy one. You'll need an icon for it as well.

'
' Create a shortcut to C:\Windows\System32\Notepad.exe on the All Users Desktop
'
Const ALL_USERS_DESKTOP = &H19&
Const SYSTEM = &H25&
Const strNotepadExe = "Notepad.exe"
Dim objFSO, objShell, objFolder, objFolderItem, WshShell, objLink
Dim strWindowsDir
Dim strSystemPath, strAllUsersDesktopPath
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set WshShell = CreateObject("WScript.Shell")
Set objFolder = objShell.Namespace(SYSTEM)
Set objFolderItem = objFolder.Self
strSystemPath = objFolderItem.Path
Set objFolder = objShell.Namespace(ALL_USERS_DESKTOP)
Set objFolderItem = objFolder.Self
strAllUsersDesktopPath = objFolderItem.Path
strAllUsersDesktopPathIcons = "C:\My_Icons"

'
' If My_Shortcut_to_Notepad shortcut is missing from the strAllUsersDesktopPath folder, recreate it
'
If Not (objFSO.FileExists(strAllUsersDesktopPath & "\My_Shortcut_to_Notepad.lnk")) Then
Call CreateShortcut
End If
WScript.Quit
Sub CreateShortcut
Set objLink = WshShell.CreateShortcut(strAllUsersDesktopPath & "\My_Shortcut_to_Notepad.lnk")
objLink.Description = "This is the description of My Shortcut"
objLink.IconLocation = strAllUsersDesktopPathIcons & "\MyIcon.ico"
objLink.TargetPath = strSystemPath & "\" & strNotepadExe
objLink.WindowStyle = 3
objLink.WorkingDirectory = strSystemPath
objLink.Save
End Sub
Posted by: williasa 14 years ago
Senior Yellow Belt
0
I wanted to thank you. This script did exactly what I needed. Appreciated the help.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ