Added check for running instance of vscode

This commit is contained in:
Kevin Dorner 2020-10-25 11:40:20 +01:00
parent f91c0d1177
commit c35d155d99
1 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,7 @@ DefVar $DesktopShortcutArgument$
ShowBitmap "%ScriptPath%\logo.png" "MDG Visual Studio Code"
Sub_GetProperties
Sub_ConfigureProperties
Sub_PrepareInstall
WinBatch_Setup
Sub_HandleExitCode
@ -32,6 +33,13 @@ else
Set $DesktopShortcutArgument$ = ", !desktopicon"
endif
[Sub_PrepareInstall]
if (processIsRunning("Code.exe"))
comment "Killing Process..."
Killtask "Code.exe"
sleepSeconds 3
endif
[WinBatch_Setup]
%ScriptPath%\data\VSCodeSetup-x64-$Version$.exe /VERYSILENT /SUPPRESSMSGBOXES /MERGETASKS="!runcode$ContextMenuArguments$$DesktopShortcutArgument$" /LOG="%opsiLogDir%\vscode-install.log"