Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Renaming a UNC in a LNK file

Posted on 2015-01-27
2
Medium Priority
?
220 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 2000 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

721 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