' Создаем ярлык
Dim DesktopPath
DesktopPath = WSHShell.SpecialFolders("Desktop")
Dim MyDocsPath
MyDocsPath = WSHShell.SpecialFolders("MyDocuments")
Dim FileSystem
Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
If Not FileSystem.FileExists(DesktopPath + "Заказ пропусков.lnk") then
Dim MyShortcut
Set MyShortcut = WSHShell.CreateShortcut(DesktopPath + "Заказ пропусков.lnk")
MyShortcut.TargetPath = WScript.ScriptFullName
MyShortcut.WorkingDirectory = MyDocsPath
MyShortcut.WindowStyle = 3
MyShortcut.Save
End If
' Запускаем программу
WSHShell.Run """" & ExeFile & """", 3