El siguiente script permite crear un acceso directo en el escriotorio.

desktop.vbs

Visual Basic:
  1. Dim WSHShell, fs
  2. Set WSHShell = WScript.CreateObject("WScript.Shell")
  3.  
  4. Set fs = WScript.CreateObject("Scripting.FileSystemObject")
  5.  
  6. Function MakeDesktopShortcut( name, target )
  7.     Dim Shortcut,DesktopPath,StartupPath
  8.    
  9.     DesktopPath = WSHShell.SpecialFolders("Desktop")
  10.     Set Shortcut = WSHShell.CreateShortcut(DesktopPath & "\" & name & ".lnk")
  11.     Shortcut.TargetPath = target
  12.     StartupPath = fs.GetParentFolderName( target )
  13.     If fs.FolderExists( StartupPath ) then
  14.         Shortcut.WorkingDirectory = StartupPath
  15.     End If
  16.     Shortcut.Save
  17. End Function
  18.  
  19. MakeDesktopShortcut "Shortcut to Calc","c:/windows/system32/calc.exe"

Popularidad: 73%