How do I change shortcut targets via .vbs?

1,050 pts.
Tags:
Visual Basic
Windows Server 2003
Windows XP Pro SP3
I asked a similar question in the past and think I am close to an answer going the scripted route. Simple phrase of the question, I need to redirect shortcut ".lnk" items in a users profile from "\oldfolderfolderanything" to "\newfolderfolderanything". I have a script to do that, but when I click on the remapped link, it goes back to the original "\old" location and then remaps itself to there again. Is this mapping cached? And how do I set that information so it stays and will not go to the old location anymore? Also is there a script to change a mapping from "\servera" to "\serverb" but leave the drive letter the same? I could run the two together and fix the drive mapping to the new location and then remapp the shortcuts. The folder structure will be the same on the new server.

Software/Hardware used:
xp pro sp3, server 2003
ASKED: May 25, 2010  6:45 PM
UPDATED: May 26, 2010  4:36 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • DoneThat
    HAH! Amazing. I just ran into the same need and found just the ticket. Go to this web site: http://community.spiceworks.com/scripts/show/298-change-shortcut-lnk-target-paths-in-bulk Download Rob Dunn's VBS and run it. Caution: It only worked in "Mode 1" for me. But I probably did something wrong executing the other modes. Didn't matter - I just needed it to work! It zipped through 300+ scripts, changed them all perfectly AND generates a savable HTML log of all activity. Kudos to Rob Dunn for generously making the script available to the community. Good luck with it, Gary
    830 pointsBadges:
    report
  • DoneThat
    Slight typo...zipped through 300+ scripts s/b 300+ shortcuts.
    830 pointsBadges:
    report
  • swinehart6803
    That's what I was using, and I believe the issue is that you have to make sure the original target data is either moved, not shared or somehow no longer available to the end user, otherwise it goes right back to the original target location. I figured that out yesterday during some testing. I will make a few test folders, move them and then try out the script. Will post back when that is done.
    1,050 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following