rem Создание ярлыка запуска Amadeus

Function ShCut(Desktop)
Dim oShortCut
On Error Resume Next
Set oShortCut = oShell.CreateShortcut(Desktop & "\Amadeus.lnk")
oShortCut.TargetPath = ProgPath & "\Internet Explorer\iexplore.exe"
oShortCut.IconLocation = ProgPath & "\Automatic Update\AutoUpdate.exe ,0"
oShortCut.Arguments = "http://amadeusvista.com/?launcher=Y"
oShortCut.Save()
ShCut = Err.Number
On Error Goto 0
End Function

Dim oShell, ProgPath
Set oShell = CreateObject ("WScript.Shell")
If oShell.ExpandEnvironmentStrings("%ProgramFiles(x86)%") = "%ProgramFiles(x86)%" Then ProgPath = "%ProgramFiles%" Else ProgPath = "%ProgramFiles(x86)%"
rem MsgBox ProgPath
If ShCut(oShell.SpecialFolders("AllUsersDesktop")) = 0 Then
 MsgBox "Amadeus shortcut created for all users"
ElseIf ShCut(oShell.SpecialFolders("Desktop")) = 0 Then
 MsgBox "Amadeus shortcut created for current user"
Else MsgBox "Amadeus shortcut cannot be created"
End If

