• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1832
  • Last Modified:

VBScript - Change .URL target recursively

From a VBS login script I need to be able to walk the user's file system and change the location of an Internet shortcut from one website to another based on what the existing shortcut target is. We are moving an application from one server to another and several hundred desktops have these shortcuts all over the place (desktop, start menu, favorites folder).

I'm fairly good with VBS and I'm not asking you to write the code for me. A few links would be helpful enough.

TIA
0
in2ative1
Asked:
in2ative1
1 Solution
 
JonMnyCommented:
you could use wmi

strComputer = "." ' .= current computer
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService. _
    ExecQuery("Select * From CIM_DataFile where FileName = 'Test' and Extension ="txt" and Drive ='C:')

For Each objFile in colFiles
'do what you need here
Next


see link
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jun06/hey0622.mspx

or
see Find File Information at

http://billsway.com/vbspage/
0
 
in2ative1Author Commented:
Yup... this is what I was looking for.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now