viewpoint-particle

Author Topic: Network Location ShortCut.  (Read 2195 times)

morenos1

  • Jr. Member
  • **
  • Posts: 84
Network Location ShortCut.
« 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 ....

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Network Location ShortCut.
« Reply #1 on: December 06, 2013, 12:45:47 pm »
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
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 )
Deana F.
Technical Support
Wilson WindowWare Inc.