on error resume next
Set oShell = CreateObject("WScript.Shell")
set oFso = CreateObject("Scripting.FilesystemObject")
sPath = oShell.SpecialFolders("Desktop")
ChkLnk(sPath)
sPath = oShell.SpecialFolders("AllUsersDesktop")
ChkLnk(sPath)
sPath = oShell.SpecialFolders("Favorites")
ChkLnk(sPath)
Sub ChkLnk (sFolder)
Set oFolder = oFso.GetFolder(sFolder)
Set oFiles = oFolder.Files
For Each oFile In oFiles
If LCase(oFso.GetExtensionName(oFile)) = "url" Then
Set oLnk = oShell.CreateShortcut(oFile)
If InStr(LCase(oLnk.TargetPath),"ausysrohan/infraenterprise/infraenterprise") > 0 Then
oLnk.TargetPath = Replace(LCase(oLnk.TargetPath),"ausysrohan","ausysinfisp01")
oLnk.Save
End If
End If
Next
End Sub
|