Quote from
danito on December 8, 2019, 12:00 am
Hola, prueba esta función.
{NeoBook Function}
Version=5.80
Language=VBScript
Param=[%1]|Text|App Name
Param=[%2]|Text|App Path incluide .Exe
Param=[%3]|Text|Name folder
{End}
Dim WSHShell, MyShortcut, ProgramsPath, folder
Set WSHShell = CreateObject("WScript.Shell")
ProgramsPath = WSHShell.SpecialFolders("Programs")
set folder = CreateObject ( "Scripting.FileSystemObject")
folder.CreateFolder (ProgramsPath & "\[%3]")
Set MyShortcut = WSHShell.CreateShortcut(ProgramsPath & "\[%3]" & "\[%1].lnk")
' Set shortcut object properties and save it
MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings("[%2]")
MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("%windir%")
MyShortcut.WindowStyle = 4
MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings("[%2], 0")
MyShortcut.Save
MsgBox "You shortcut to has been created."
Así la llamas.
Call "Start_Menu" "Control Tienda" "C:\PROGRAMA\Control Tienda.exe" "Folder"
Hola, prueba esta función.
{NeoBook Function}
Version=5.80
Language=VBScript
Param=[%1]|Text|App Name
Param=[%2]|Text|App Path incluide .Exe
Param=[%3]|Text|Name folder
{End}
Dim WSHShell, MyShortcut, ProgramsPath, folder
Set WSHShell = CreateObject("WScript.Shell")
ProgramsPath = WSHShell.SpecialFolders("Programs")
set folder = CreateObject ( "Scripting.FileSystemObject")
folder.CreateFolder (ProgramsPath & "\[%3]")
Set MyShortcut = WSHShell.CreateShortcut(ProgramsPath & "\[%3]" & "\[%1].lnk")
' Set shortcut object properties and save it
MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings("[%2]")
MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("%windir%")
MyShortcut.WindowStyle = 4
MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings("[%2], 0")
MyShortcut.Save
MsgBox "You shortcut to has been created."
Así la llamas.
Call "Start_Menu" "Control Tienda" "C:\PROGRAMA\Control Tienda.exe" "Folder"