50 lines
1.5 KiB
TeX
50 lines
1.5 KiB
TeX
[Initial]
|
|
Message=Installiere MDG Visual Studio Code...
|
|
DefVar $Version$
|
|
DefVar $ExitCode$
|
|
DefVar $CreateContextMenuEntry$
|
|
DefVar $ContextMenuArguments$
|
|
DefVar $CreateDesktopShortcut$
|
|
DefVar $DesktopShortcutArgument$
|
|
|
|
[Aktionen]
|
|
ShowBitmap "%ScriptPath%\logo.png" "MDG Visual Studio Code"
|
|
Sub_GetProperties
|
|
Sub_ConfigureProperties
|
|
WinBatch_Setup
|
|
Sub_HandleExitCode
|
|
|
|
[Sub_GetProperties]
|
|
Set $Version$ = GetValue("productversion", GetProductMap)
|
|
Set $CreateContextMenuEntry$ = GetProductProperty("contextmenuentry", "false")
|
|
Set $DesktopShortcutArgument$ = GetProductProperty("desktopshortcut", "false")
|
|
|
|
[Sub_ConfigureProperties]
|
|
if ($CreateContextMenuEntry$)
|
|
Set $ContextMenuArguments$ = ", !addcontextmenufiles, !addcontextmenufolders"
|
|
else
|
|
Set $ContextMenuArguments$ = ""
|
|
endif
|
|
|
|
if ($CreateDesktopShortcut$)
|
|
Set $DesktopShortcutArgument$ = ", !desktopicon"
|
|
else
|
|
Set $DesktopShortcutArgument$ = ""
|
|
endif
|
|
|
|
[WinBatch_Setup]
|
|
%ScriptPath%\data\VSCodeSetup-x64-$Version$.exe /VERYSILENT /SUPPRESSMSGBOXES /MERGETASKS="!runcode$ContextMenuArguments$$DesktopShortcutArgument$" /LOG="%opsiLogDir%\vscode-install.log"
|
|
|
|
; VERYSILENT unterdrückt das Installationsfenster
|
|
; SUPPRESSMSGBOXES unterdrückt Benachrichtigungsfenster
|
|
; MERGETASKS verhindert das automatische Starten des Programms nach der Installation
|
|
|
|
[Sub_HandleExitCode]
|
|
; check return code
|
|
Set $ExitCode$ = GetLastExitCode
|
|
comment "GetLastExitCode: " + $ExitCode$
|
|
if not($ExitCode$ = "0")
|
|
LogError "Fatal: setup returned exit code " + $ExitCode$
|
|
IsFatalError
|
|
endif
|