I have a script that will create a shortcut for me and delete one that is local to a users profile. The problem i'm having is this is in a citrix enviorment that. The uses desktop is redirect to a network share. so the shortcut is located at
\\server\users$\user\desktop.
what i would like to do is replace the first part of the code to delete the lnk from
\\server\users$\%username%\desktop\
i'm really not sure how to do this since i'm really not a scripting guy. any help will be greatfully appricated.
On Error Resume NextSET fso = Wscript.CreateObject("Scripting.FileSystemObject")SET WshShell = WScript.CreateObject("WScript.Shell")strFavs = WshShell.SpecialFolders("Desktop")Set oFiles = fso.GetFolder(strFavs)For Each oFile In oFiles.Files If lcase(oFile.Name) = "Microsoft Office Outlook 2003.lnk" Then oFile.Delete True End IfNextset WshShell = WScript.CreateObject("WScript.Shell")strDesktop = WshShell.SpecialFolders("Desktop")set oShellLink = WshShell.CreateShortcut(strDesktop _ & "\Microsoft Outlook 2007.lnk")oShellLink.TargetPath = _ "N:\Program Files\Microsoft Office\OFFICE12\outlook.EXE"oShellLink.WindowStyle = 1oShellLink.Hotkey = "CTRL+SHIFT+F"oShellLink.IconLocation = _ "N:\Program Files\Microsoft Office\OFFICE12\outloo.EXE, 0"oShellLink.Description = "Outlook 2007 Shortcut"oShellLink.WorkingDirectory = strDesktopoShellLink.Save
ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.
One of a set of tools we're offering as a way to say thank you for being a part of the community.
Open in new window