Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help.... shortcut script

Status
Not open for further replies.

it8ez2b

IS-IT--Management
May 13, 2008
1
US
Ok I need help Guys! I need a shortcut script to change the url of a several shortcuts icons. I know nothing about scripting. Please help!

I want to replace all the shortcuts with a specific name (ex navi.lnk) in a subdirectory for all users folders.

ex.

C:\data\profiles\ johndoe \navi.lnk
C:\data\profiles\ petelong \navi.lnk
C:\data\profiles\ bobhope \navi.lnk


That is basically it! If you need more details to understand.....ok

I have two servers running the exact same programs. If the primary server goes down, I want to run the script and change over about 100 users icon shortcut.

Example:
All the users shortcut icons in the C:\data\profiles\ username folder
is pointing to 10.0.25.35. If 10.0.25.35 server goes down, I would like to run the script and change all the shortcuts in that directory to 10.0.25.45.
 
What have you tried so far and where in your code are you stuck ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I would suggest you download a copy of the Script Repository from microsoft.com. In that you will get full code examples of creating a shortcut.

I further suggest that you not bother with editing the shortcut. Check if it exists andif so delete it. Then create a new one with your new path. As a beginner I think you will find that easier from a learning perspective.

Otherwise I suggest you use google search on this forum, either PHV or tsuji has already posted sample code for editing the target of a shortcut.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top