WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: morenos1 on December 06, 2013, 10:32:57 AM

Title: Network Location ShortCut.
Post by: morenos1 on December 06, 2013, 10:32:57 AM
When creating the following ShortCut:

name = "Location Name"
   
target = "\\server\share"

ShortCutMake( Environment("USERPROFILE") : "\NetHood\":name, target, "", "", 2, 0 )

How can I, later on, modify the ShorCut to point to a different location?


Thanks ....
Title: Re: Network Location ShortCut.
Post by: Deana on December 06, 2013, 12:45:47 PM
Quote from: morenos1 on December 06, 2013, 10:32:57 AM
When creating the following ShortCut:

name = "Location Name"
   
target = "\\server\share"

ShortCutMake( Environment("USERPROFILE") : "\NetHood\":name, target, "", "", 2, 0 )

How can I, later on, modify the ShorCut to point to a different location?


Thanks ....

Use ShortCutEdit. You will also want to give the file the file extension .LNK:

Code (winbatch) Select
name = "Location Name"
lnkpath =  Environment("USERPROFILE") : "\NetHood\":name:".lnk"

target = "\\server\share"
ShortCutMake(lnkpath, target, "", "", 2, 0 )

newtarget =  "\\server2\share"
ShortCutEdit(lnkpath, newtarget, "", "", @normal, 0 )