Solved

Renaming a UNC in a LNK file

Posted on 2015-01-27
2
194 Views
Last Modified: 2015-01-27
Hi there,

I need to create a batch file that will do the following.

I need to read the UNC of an LNK file.  If it contains "Elvis", replace the computer name portion of the UNC to an IP address.

LNK file name=Elvis.lnk
UNC Before=\\Server1\share\elvis
UNC After=\\192.168.10.10\share\elvis

Thanks for helping,
Rene
0
Comment
Question by:ReneGe
2 Comments
 
LVL 23

Accepted Solution

by:
NVIT earned 500 total points
Comment Utility
I use a 3rd party tool for this http://optimumx.com/downloads.html#Shortcut.

I don't know if there's a built-in Windows tool.

shortcut /F:"Elvis.lnk" /A:E /T:\\192.168.10.10\share\elvis

Open in new window


Do you need to know the existing value before doing the change?
0
 
LVL 10

Author Comment

by:ReneGe
Comment Utility
Good job!!!

Works like a charm :)

Thanks and cheers,
Rene
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now