Crear Acceso Directo
Posted on November 12th, 2007 in Código, Script |
El siguiente script permite crear un acceso directo en el escriotorio.
desktop.vbs
Visual Basic:
-
Dim WSHShell, fs
-
Set WSHShell = WScript.CreateObject("WScript.Shell")
-
-
Set fs = WScript.CreateObject("Scripting.FileSystemObject")
-
-
Function MakeDesktopShortcut( name, target )
-
Dim Shortcut,DesktopPath,StartupPath
-
-
DesktopPath = WSHShell.SpecialFolders("Desktop")
-
Set Shortcut = WSHShell.CreateShortcut(DesktopPath & "\" & name & ".lnk")
-
Shortcut.TargetPath = target
-
StartupPath = fs.GetParentFolderName( target )
-
If fs.FolderExists( StartupPath ) then
-
Shortcut.WorkingDirectory = StartupPath
-
End If
-
Shortcut.Save
-
End Function
-
-
MakeDesktopShortcut "Shortcut to Calc","c:/windows/system32/calc.exe"
Popularidad: 73%

