Added option and code improvements

This commit is contained in:
UnlimitedCookies
2020-10-22 15:14:32 +02:00
parent 57cb919f41
commit eba994921b
3 changed files with 30 additions and 10 deletions

View File

@@ -1,25 +1,39 @@
[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 $CreateContextMenuEntry$ = GetProductProperty("desktopshortcut", false)
[Sub_ConfigureProperties]
if ($CreateContextMenuEntry$ = "True")
Set $ContextMenuArguments$ = ", !addcontextmenufiles, !addcontextmenufolders"
else
Set $ContextMenuArguments$ = ""
endif
if ($CreateDesktopShortcut$ = "True")
Set $DesktopShortcutArgument$ = ", !desktopicon"
else
Set $DesktopShortcutArgument$ = ""
endif
[WinBatch_Setup]
if ($CreateContextMenuEntry$)
comment "Installing with contextmenu entries..."
VSCodeSetup-1.10.1.exe /VERYSILENT /SUPPRESSMSGBOXES /MERGETASKS="!runcode" /LOG="%opsiTmpDir%\install.log"
else
comment "Installing without contextmenu entries..."
VSCodeSetup-1.10.1.exe /VERYSILENT /SUPPRESSMSGBOXES /MERGETASKS="!runcode, !addcontextmenufiles, !addcontextmenufolders" /LOG="%opsiTmpDir%\install.log"
endif
%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