?
Solved

VBScript - Change .URL target recursively

Posted on 2007-10-02
2
Medium Priority
?
1,804 Views
Last Modified: 2008-01-09
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
Comment
Question by:in2ative1
2 Comments
 
LVL 9

Accepted Solution

by:
JonMny earned 2000 total points
ID: 20001286
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
 

Author Comment

by:in2ative1
ID: 20001424
Yup... this is what I was looking for.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Simple Linear Regression

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question