Office 2021 deinstallieren, Icons bleiben

Antworten
Rzpertt
Beiträge: 74
Registriert: 15 Jan 2021, 10:41

Office 2021 deinstallieren, Icons bleiben

Beitrag von Rzpertt »

Hallo,

ich fange gerade an die Office 2021 Installation über opsi einzurichten.
Die Installation selber geht gut, ich kopiere die Dateien auf den Rechner und installiere dann.
Die Setup Dateien bleiben dort erstmal liegen, die remove.office.xml wird gleich bei der Installation kopiert.

Jetzt habe ich die XML für die Deinstallation erstellt und es wird auch das Office deinstalliert aber die Icons sind alle noch im Windows 11 Startmenu.
Fehlt das noch was in der XML oder nimmt man dafür immer das SaRA Tool von MS?

Code: Alles auswählen

<Configuration>

	<Remove All="True"/>
	<RemoveMSI>
		 <IgnoreProduct ID="PrjStd" />
		 <IgnoreProduct ID="PrjPro" />
		 <IgnoreProduct ID="VisStd" />
		 <IgnoreProduct ID="VisPro" />		 
		 <IgnoreProduct ID="PrjStdR" />
		 <IgnoreProduct ID="PrjProR" />
		 <IgnoreProduct ID="VisstdR" />
		 <IgnoreProduct ID="VisProR" />
	</RemoveMSI>
  <Display Level="None" AcceptEULA="TRUE"/>
  <Logging Level="Standard" Path="%temp%" />
	<Property Name="SharedComputerLicensing" Value="0" />
	<Property Name="AUTOACTIVATE" Value="1"/>
</Configuration>
delinc.opsiinc:

Code: Alles auswählen

; ----------------------------------------------------------------
; This is a opsi-script file.
; See https://opsi.org    https://uib.de
; This code was originally created by opsi-setup-detector 4.3.1.4
; ----------------------------------------------------------------
encoding=utf8


; ---------------------------------------------------------------
comment "check if there is something to uninstall"
; ----------------------------------------------------------------
Message "Check for existing installation of " + $ProductId$ + " ..."

comment "Start the Uninstall check:"
set $oldProgFound$ = "false"

if directoryExists($InstallDir$)
	set $oldProgFound$ = "true"
endif


if $oldProgFound$ = "true"
	Message "Uninstalling " + $ProductId$
	; ---------------------------------------------------------------
	comment "run the uninstall program"
	; ----------------------------------------------------------------
	
	
	comment "Start uninstall program"
	;----------------------------------------------
	Winbatch_uninstall_1  
	;----------------------------------------------
	; ---------------------------------------------------------------
	comment "check the result"
	; ----------------------------------------------------------------
	; check the outcome of the call, produce either a "failed" state of the script or log the result
	set $ExitCode$ = getlastexitcode
	if "true" = isGenericExitcodeFatal($exitcode$, "true", $ErrorString$ )
		LogError $ErrorString$
		isfatalerror $ErrorString$
	else
		Comment $ErrorString$
	endif
	
	
	
	; ---------------------------------------------------------------
	comment "cleanup installation directory"
	; ----------------------------------------------------------------
	
	if not(($InstallDir$ = '') or ($InstallDir$ = 'unknown'))
	;	Files_uninstall
	endif
	
	
endif

;-----------------------------------------------------
uninstall.opsiscript

Code: Alles auswählen

; ----------------------------------------------------------------
; This is a opsi-script file.
; See https://opsi.org    https://uib.de
; This code was originally created by opsi-setup-detector 4.3.1.4
; ----------------------------------------------------------------
encoding=utf8

;here we start
[Actions]

;check if the running opsiscript version is not too old
requiredOpsiscriptVersion >= "4.12.5.0"

;fetch helper libraries
importlib "uib_exitcode.opsiscript"
importlib "osd-lib.opsiscript"


; All variables are defined here:
include_insert "declarations.opsiinc"
; All sections are defined here:
include_append "sections.opsiinc"



; ----------------------------------------------------------------
comment "put fixed infos into the script (maybe produced by the setup detector maybe manually)"
; ----------------------------------------------------------------
; the values can be manually edited or automatically suggested by the opsi setup detector
;
; ----------------------------------------------------------------
; $ProductId$ is the name of the product in opsi, only lower letters, no umlauts, no white spaces, use '-' as a separator
Set $ProductId$		 = "office2021"
; the path where we find the product after the installation
Set $InstallDir$	= "c:\Program Files\Microsoft Office"
; ----------------------------------------------------------------
; the operating system, in which the interpreter is running
; supported values are  "Windows_NT", "Linux", "MacOS"
set $OS$ = GetOS

; ----------------------------------------------------------------
comment  "check if the script is adequate to the environment"
; ----------------------------------------------------------------

set $OS$ = GetOS

if not(($OS$ = "Windows_NT"))
	logError "Installation aborted: wrong OS version: only Windows"
	isFatalError "wrong OS"
endif

; ---------------------------------------------------------------
comment "inform the user at the PC about product installation"
; ----------------------------------------------------------------
; for a better visual appearance, show some graphic (at most of size 160x160 [px] )
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$



if FileExists("%ScriptPath%\delinc.opsiinc")
	comment "Start uninstall part"
	include_insert "%ScriptPath%\delinc.opsiinc"
endif

[Winbatch_uninstall_1]
"c:\temp\Office2021\setup.exe" /configure "c:\temp\Office2021\remove-Office2021.xml"


; ----------------------------------------------------------------
; ----------------------------------------------------------------

Antworten