Solved

Renaming a UNC in a LNK file

Posted on 2015-01-27
2
198 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 24

Accepted Solution

by:
NVIT earned 500 total points
ID: 40573662
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
ID: 40573779
Good job!!!

Works like a charm :)

Thanks and cheers,
Rene
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 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