Click here to Skip to main content
12,951,619 members (64,495 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Guys/Gals,

I have created this little script to copy the icon shortcut with url shortcut
that will install a shortcut to the specific website with a defined icon, on employees desktops. I'm currently using VBScript to create the shortcut. Below is the working code:

Set WshShell = CreateObject("WScript.Shell")
strDesktopPath = WshShell.SpecialFolders("Desktop")
Set objShortcutUrl = WshShell.CreateShortcut(strDesktopPath & "\Shortcut name goes here.lnk")
objShortcutUrl.TargetPath = "Web link goes here"
objShortcutUrl.IconLocation = "icon path goes here"

At the moment it does not give any confirmation if the shortcut has been copied onto the desktop, the script is working fine it does push the icon shortcut. But I am wondering if a prompt pops up saying "Icon copied or installed successfully etc." Can a line be added in the script for prompt popup??

I would appreciate any help please. Thanks in advance.
Posted 17-Aug-12 11:07am
Updated 18-Aug-12 3:44am
Wes Aday 17-Aug-12 17:42pm
"Can a line be added in the script"... of course you can. I am going to out on a limb and assume that your real question is something like "How can I show a message box?" or something like that.... and the answer can be found here,
Wes Aday 17-Aug-12 18:34pm
What does "doesn't seems to be working" mean? Do you get the message box? It does not terminate?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Espen Harlinn 18-Aug-12 12:33pm
Nice link :-D
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I got this code which does the job.
x=msgbox("Your Text Here" ,0, "Your Title Here")
Espen Harlinn 18-Aug-12 12:33pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,229
CHill60 3,490
Maciej Los 3,083
Jochen Arndt 1,975
ppolymorphe 1,880

Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 18 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100