Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a shortcut within "Favorities" folder for all users.

Status
Not open for further replies.

KOldfield

Technical User
Dec 5, 2006
1
US
Need some help!! Basically create a shortcut within the "Favorites" folder for all the users with profiles on a computer. The code below will only create the
shortcut for the Logged on user. Need something that will loop through each profile and create a shortcut in the favorites folder.

Const ADMINISTRATIVE_TOOLS = 6
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(ADMINISTRATIVE_TOOLS)
Set objFolderItem = objFolder.Self
Set objShell = WScript.CreateObject("WScript.Shell")
FavoriteName = "WebVPN"
FavoriteUrl = "Set objURLShortcut = objShell.CreateShortcut(objFolderItem.Path &
"\" & FavoriteName & ".url")
objURLShortcut.TargetPath = FavoriteUrl
objURLShortcut.Save
 
So much easier to do what you are asking with Group Policy. Does it have to be scripted?

PSC
[—] CCNP (R&S/Wireless) [•] CCSP [•] MCITP: Enterprise Admin [•] MCSE [—]

Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top