On Error resume next
SET fso = Wscript.CreateObject("Scripting.FileSystemObject")
SET WshShell = WScript.CreateObject("WScript.Shell")
'Create the icon in the user's Favorites Folder
strFavs = WshShell.SpecialFolders("Favorites")
strshortcut = strFavs & "\Companyweb.url"
If Not fso.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
oUrlLink.TargetPath = "[URL unfurl="true"]http://companyweb"[/URL]
oUrlLink.Save
End If
'Now create the icon on the Users Desktop
'Note: to create the icon for all users use the Special Folder [b]AllUsersDesktop[/b]
strFavs = WshShell.SpecialFolders("Desktop")
strshortcut = strFavs & "\Companyweb.url"
If Not fso.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
oUrlLink.TargetPath = "[URL unfurl="true"]http://companyweb"[/URL]
oUrlLink.Save
End If