diff --git a/control b/control index ce45518..79a87f1 100644 --- a/control +++ b/control @@ -4,14 +4,20 @@ id: mdg-visual-studio-code name: MDG Visual Studio Code description: VSCode ist eine von Microsoft entwickelte, weit verbreitete Entwicklungsumgebung mit Unterstützung für eine Vielzahl an Erweiterungen. Der Großteil des Programms ist quelloffen. advice: Erweiterungen werden im Verzeichnes %USERPROFILE%\.vscode\extensions und somit im Windows-Profil des Nutzers installiert. -version: 1.0 +version: 1.50.1 packageVersion: 1.0 setupScript: install.ins uninstallScript: remove.ins +[ProductProperty] +name: desktopshortcut +type: bool +description: Verknüpfung auf dem Windows Desktop erstellen +default: False + [ProductProperty] name: contextmenuentry type: bool description: Windows-Explorer Kontextmenüeintrag erstellen helptext: Dieser Kontextmenüeintrag wird für Dateien und Ordner im Windows-Explorer erzeugt. -default: false \ No newline at end of file +default: False diff --git a/install.ins b/install.ins index 6f2c638..5ddf31d 100644 --- a/install.ins +++ b/install.ins @@ -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 diff --git a/remove.ins b/remove.ins index 14f12d6..233bfaa 100644 --- a/remove.ins +++ b/remove.ins @@ -8,7 +8,7 @@ WinBatch_Setup Sub_HandleExitCode [WinBatch_Setup] -"%ProgramFiles%\Microsoft VS Code\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /MERGETASKS="!runcode" /LOG="%opsiTmpDir%\uninstall.log" +"%ProgramFiles%\Microsoft VS Code\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /LOG="%opsiLogDir%\vscode-uninstall.log" ; VERYSILENT unterdrückt das Installationsfenster ; SUPPRESSMSGBOXES unterdrückt Benachrichtigungsfenster