40 lines
1.1 KiB
TeX
40 lines
1.1 KiB
TeX
[Initial]
|
|
Message=Deinstalliere MDG Visual Studio Code...
|
|
DefVar $ExitCode$
|
|
DefVar $UninstallExecutablePath$
|
|
|
|
[Aktionen]
|
|
ShowBitmap "%ScriptPath%\logo.png" "MDG Visual Studio Code"
|
|
Sub_PrepareRemove
|
|
WinBatch_Setup
|
|
Files_Cleanup
|
|
Sub_HandleExitCode
|
|
|
|
[Sub_PrepareRemove]
|
|
if (processIsRunning("Code.exe"))
|
|
comment "Killing Process..."
|
|
Killtask "Code.exe"
|
|
sleepSeconds 3
|
|
endif
|
|
|
|
; Retrieve Uninstall executable Path
|
|
Set $UninstallExecutablePath$ = getRegistryValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EA457B21-F73E-494C-ACAB-524FDE069978}_is1", "UninstallString","64bit")
|
|
|
|
[WinBatch_Setup]
|
|
$UninstallExecutablePath$ /VERYSILENT /SUPPRESSMSGBOXES /LOG="%opsiLogDir%\vscode-uninstall.log"
|
|
|
|
; VERYSILENT unterdrückt das Installationsfenster
|
|
; SUPPRESSMSGBOXES unterdrückt Benachrichtigungsfenster
|
|
|
|
[Files_Cleanup]
|
|
delete -sf "%ProgramFiles64Dir%\Microsoft VS Code\"
|
|
|
|
[Sub_HandleExitCode]
|
|
; check return code
|
|
Set $ExitCode$ = GetLastExitCode
|
|
comment "GetLastExitCode: " + $ExitCode$
|
|
if not($ExitCode$ = "0")
|
|
LogError "Fatal: setup returned exit code " + $ExitCode$
|
|
IsFatalError
|
|
endif
|