Solved

Renaming a UNC in a LNK file

Posted on 2015-01-27
2
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

627 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