Solved

Renaming a UNC in a LNK file

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

19 Experts available now in Live!

Get 1:1 Help Now