I want to uninstall KB in the clients who are in win7 and hide them with a vbs script. For the moment, I can't uninstall the kb3035583.
When I launch the product from Opsi, he's executing with no error but the KB is still installed on the client. No problem when I execute the *.bat from local hard disk (c:\temp\suppr_majs_win10.bat)
suppr_majs_win10.bat:
Code: Alles auswählen
@echo off
REM openfiles.exe 1>nul 2>&1
REM if not %errorlevel% equ 0 (
REM Echo Imperatif d executer en tant que administrateur
REM pause
REM EXIT 1
REM ) else
(
SETLOCAL
REM --- uninstall updates
echo desinstallation des majs ...
echo Suppression KB3083710
start "title" /b /wait wusa.exe /kb:3083710 /uninstall /quiet /norestart
echo - suivant
echo Effectue.
timeout 5
)
Code: Alles auswählen
[Actions]
requiredWinstVersion >= "4.11.5.13"
comment "On desinstalle les majs pour windows 10 et on les masque"
ShowBitmap "%ScriptPath%\pas_de_win10.png"
Message "On desinstalle les majs pour windows 10 et on les masque"
DosBatch_suppr_majs_win10 /RunElevated /Sysnative
[DosBatch_suppr_majs_win10]
"c:\temp\suppr_majs_win10.bat"
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif
Thks a lot!