0

I have few remote servers for which i need to create shortcuts and put those shortcuts in a folder.And place it in users machine, so that when user clicks on the shortcut,User will get the explorer of D:\ drive on the remote server. Please help in this regard

mishra1010
  • 78
  • 3
  • 12
  • 1
    http://www.whathaveyoutried.com – ta.speot.is Feb 05 '13 at 07:51
  • Thanks for making me do it. It was quite a simple task. – mishra1010 Feb 06 '13 at 07:48
  • steps:1.share the drive to which we want to create shortcut. 2. Then go to another machine in the same network and click on control panel->network and internet connections->my network places. 3.click on add a network place. 4. enter///.In my case it was //10.10.20.12/d$. 5. Enter a name and click finish. After this we can create a shortcut on to desktop. – mishra1010 Feb 06 '13 at 07:54

1 Answers1

1

Here's some example vbscript that'll do the trick I think. (credit where credit is due)

Set oShell = CreateObject("WScript.Shell")

sAllUsersDesktopPath = oShell.SpecialFolders("AllUsersDesktop")

sWinSysDir = oShell.ExpandEnvironmentStrings("%SystemRoot%\System32")

Set oShortCut = oShell.CreateShortcut( _
         sAllUsersDesktopPath & "\D Drive on gibson.lnk")

oShortCut.TargetPath = sWinSysDir & "\Explorer.exe"
oShortCut.Arguments = "\\servername\d$"
oShortCut.IconLocation = sWinSysDir & "\Shell32.dll,10"
oShortCut.Save

Change the oShortCut.Arguments value as needed to point to the appropriate share on your servers, and change the "D drive on gibson" name as necessary. Save this to a .vbs file and execute it with cscript or wscript.

Or you can try using the freeware shortcut.exe from Optimum X.

rojo
  • 24,000
  • 5
  • 55
  • 101