Uninstall von Office2016 nicht vollständig möglich

Antworten
ITQIT
Beiträge: 11
Registriert: 15 Jan 2018, 16:32

Uninstall von Office2016 nicht vollständig möglich

Beitrag von ITQIT »

Hallo zusammen,
ich habe mit unserem Opsi das Standard Script zur Installation und Deinstallation von Office 2016 im Einsatz.
Beim deinstallieren werden die Office Produkte nur Teilweise deinstalliert.

Nach dem ich den uninstall Befehl abgesetzt habe tut sich am Zielrechner etwas, Opsi Agent Startet die Deinstallation.
Nach Abschluss sind die Icons für Office noch da, jedoch wenn man darauf klickt kommt die Meldung das die Anwendung fertig installiert werden muss. In der Systemsteuerung unter Programme findet sich die Anwendung "Microsoft Professional Plus 2016" Der Lässt sich nicht deinstallieren mit dem verwendeten Script.

Code: Alles auswählen

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/

[Actions]
requiredWinstVersion >= "4.11.3.3"

DefVar $SetupType$
DefVar $MsiId$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ErrorMsg$
DefVar $ProductId$
DefVar $InstallDir$
DefVar $LicenseRequired$
DefVar $LicensePool$

Set $LogDir$ = "%opsiLogDir%"

; ----------------------------------------------------------------; ----------------------------------------------------------------
Set $SetupType$ = "nsis"
; ----------------------------------------------------------------; ----------------------------------------------------------------

; ----------------------------------------------------------------; ----------------------------------------------------------------
; - Please check the following values                             -
; ----------------------------------------------------------------
Set $ProductId$       = "office2016_de"
Set $InstallDir$      = "C:\Program Files\Microsoft Office"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
; ----------------------------------------------------------------


comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$

Message "Uninstalling " + $ProductId$ + " ..."

if FileExists("%ScriptPath%\delsub.opsiscript")
   comment "Start uninstall sub section"
   Sub "%ScriptPath%\delsub.opsiscript"
endif

if $LicenseRequired$ = "true"
   comment "Licensing required, free license used"
   Sub_free_license
endif

[Sub_free_license]
comment "License management is enabled and will be used"

comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)

Ich muss das Deinstallieren damit ich Microsoft 365Busines Standard Installieren kann.
Bin für jede Hilfe dankbar.

Gruß
Remzi
Benutzeravatar
SisterOfMercy
Beiträge: 1556
Registriert: 22 Jun 2012, 19:18

Re: Uninstall von Office2016 nicht vollständig möglich

Beitrag von SisterOfMercy »

ITQIT hat geschrieben:ich habe mit unserem Opsi das Standard Script zur Installation und Deinstallation von Office 2016 im Einsatz.
What is standard about this script?
And without the delsub.opsiscript we won't be able to help you much.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
ITQIT
Beiträge: 11
Registriert: 15 Jan 2018, 16:32

Re: Uninstall von Office2016 nicht vollständig möglich

Beitrag von ITQIT »

Ich habe mal alle Scripte zusammengetragen die ich benutzt habe und das Logfile mit angehängt.
Ich verzweifle an der Hartnäckingen Problematik
Mein setup.opsiscript

Code: Alles auswählen

; ----------------------------------------------------------------
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/
; ----------------------------------------------------------------

;****************************************
; SETUPTYPE      nsis
;****************************************
; PRODUCTID      itq_office2016_de
; SETUPFILE      setup.exe
;****************************************
; LICENSE        false     
; PRODUCTDESC    Microsoft Office 2016 Professional Plus Deutsche Version
; PRODUCTNAME    Microsoft Office 2016 Pro DE
; PRODUCTSIZE    
; PRODUCTVER     16
;****************************************
; SETUPSCRIPT    setup.opsiscript
; UNINSSCRIPT    uninstall.opsiscript
;****************************************
; MSIID          
; USE-MST        
; INSTALLDIR     C:\Program Files\Microsoft Office
;****************************************
; TIMESTAMP      19.12.2019 11:44:38
;****************************************

[Actions]
requiredWinstVersion >= "4.11.4.3"
ScriptErrorMessages = false

DefVar $SetupType$
DefVar $ProductId$ 
DefVar $Setupfile$ 
DefVar $InstallDir$
DefVar $MinimumSpace$
DefVar $ExitCode$
DefVar $ErrorMsg$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $MsiId$
DefVar $NsisInstallBatch$
DefVar $LogDir$

Set $LogDir$ = "%opsiLogDir%"

include_append "%ScriptPath%\check_nsis_exitcode.opsiscript"

; ----------------------------------------------------------------
Set $SetupType$       = "nsis"
; ----------------------------------------------------------------

; $ProductId$ is the name of the product in opsi, only lower letters, no umlauts, no white spaces, use '-' as a seperator
Set $ProductId$       = "itq_office2016_de"
Set $Setupfile$       = "setup.exe"
; the path where we find the product after the installation
Set $InstallDir$      = "C:\Program Files\Microsoft Office"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $MsiId$           = ""
Set $MinimumSpace$    = "2 GB"
; ----------------------------------------------------------------
; ----------------------------------------------------------------

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
   LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
   isFatalError "No Space"
   ; Stop process and set installation status to failed
else
   comment "Show product picture"
   ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$

   if FileExists("%ScriptPath%\delsub.opsiscript")
      comment "Start uninstall sub section"
      Sub "%ScriptPath%\delsub.opsiscript"
   endif
   
   Message "Installing " + $ProductId$ + " ..."
   
   if $LicenseRequired$ = "true"
      comment "Licensing required, reserve license and get license key"
      Sub_get_licensekey
   endif

   if ($SetupType$ = "nsis")
      Set $NsisInstallBatch$ = ""
      if not ($InstallDir$ = '')
         Set $NsisInstallBatch$ = $NsisInstallBatch$ + ' /D="' + $InstallDir$ + '"'
      endif
   endif
   
   comment "Start setup program"
   ChangeDirectory "%SCRIPTPATH%"
   ;----------------------------------------------
   Winbatch_install_nsis
   ;----------------------------------------------
   Sub_check_exitcode	
endif


; ----------------------------------------------------------------
; install section
; ----------------------------------------------------------------

[Winbatch_install_nsis]
;NSIS Nullsoft Scriptable Install System 
;$NsisInstallBatch$
"%ScriptPath%\setup.exe" /adminfile "Office2016pro.MSP" /config "Office2016pro.MSP.xml"

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


[Sub_get_licensekey]
if opsiLicenseManagementEnabled
   comment "License management is enabled and will be used"

   comment "Trying to get a license key"
   Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
   ; If there is an assignment of exactly one licensepool to the product the following call is possible:
   ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$)
   ;
   ; If there is an assignment of a license pool to a windows software id, it is possible to use:
   ; DefVar $WindowsSoftwareId$
   ; $WindowsSoftwareId$ = "..."
   ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$)

   DefVar $ServiceErrorClass$
   set $ServiceErrorClass$ = getLastServiceErrorClass
   comment "Error class: " + $ServiceErrorClass$
   
   if $ServiceErrorClass$ = "None"
      comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
   else
      if $ServiceErrorClass$ = "LicenseConfigurationError"
         LogError "Fatal: license configuration must be corrected"
         LogError getLastServiceErrorMessage
         isFatalError
      else 
         if $ServiceErrorClass$ = "LicenseMissingError"
            LogError "Fatal: required license is not supplied"
            isFatalError
         endif
      endif
   endif
else
   LogError "Fatal: license required, but license management not enabled"
   isFatalError
endif

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


Mein uninstall.opsiscript

Code: Alles auswählen

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/

[Actions]
requiredWinstVersion >= "4.11.3.3"

DefVar $SetupType$
DefVar $MsiId$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ErrorMsg$
DefVar $ProductId$
DefVar $InstallDir$
DefVar $LicenseRequired$
DefVar $LicensePool$

Set $LogDir$ = "%opsiLogDir%"

; ----------------------------------------------------------------; ----------------------------------------------------------------
Set $SetupType$ = "nsis"
; ----------------------------------------------------------------; ----------------------------------------------------------------

; ----------------------------------------------------------------; ----------------------------------------------------------------
; - Please check the following values                             -
; ----------------------------------------------------------------
Set $ProductId$       = "itq_office2016_de"
Set $InstallDir$      = "C:\Program Files\Microsoft Office"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
; ----------------------------------------------------------------


comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$

Message "Uninstalling " + $ProductId$ + " ..."

if FileExists("%ScriptPath%\delsub.opsiscript")
   comment "Start uninstall sub section"
   Sub "%ScriptPath%\delsub.opsiscript"
endif

if $LicenseRequired$ = "true"
   comment "Licensing required, free license used"
   Sub_free_license
endif

[Sub_free_license]
comment "License management is enabled and will be used"

comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)

mein delsub.opsiscript

Code: Alles auswählen

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/

include_append "%ScriptPath%\check_nsis_exitcode.opsiscript"

DefVar $found$
DefVar $UninstallProgram$

Set $found$     = "false"
Set $MsiId$     = ''

Message "Uninstalling " + $ProductId$ + " ..."

if ($SetupType$ = "msi" or $SetupType$ = "installshieldmsi" or $SetupType$ = "advancedmsi")   
   if (GetSystemtype = "64 Bit System")
      if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
         comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
         Set $found$ = "true"
         Winbatch_uninstall_msi
         sub_check_exitcode
      endif
   endif
   if ($found$ = "false")
      if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
         comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
         Winbatch_uninstall_msi
         sub_check_exitcode
      endif
   endif
endif

if ($SetupType$ = "inno")
   Set $UninstallProgram$ = $InstallDir$ + "\unins000.exe"
   if (not($InstallDir$ = '')) and FileExists($UninstallProgram$)
      comment "Uninstall program found, starting uninstall"
      Winbatch_uninstall_inno
      sub_check_exitcode
   endif
endif

if ($SetupType$ = "installshield")
   Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
   if (not($InstallDir$ = '')) and FileExists($UninstallProgram$)
      comment "Uninstall program found, starting uninstall"
      Winbatch_uninstall_installshield
      sub_check_exitcode
   endif
endif

if ($SetupType$ = "nsis")
   Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
   if (not($InstallDir$ = '')) and FileExists($UninstallProgram$)
      comment "Uninstall program found, starting uninstall"
      Winbatch_uninstall_nsis /WaitforProcessending "Au_.exe" /Timeoutseconds 10
      sub_check_exitcode
   endif
endif

if (not($InstallDir$ = '')) and (not($InstallDir$ = "not used"))
   Files_uninstall
endif

;-----------------------------------------------------
[Winbatch_uninstall_msi]
msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress

[Winbatch_uninstall_inno]
"$UninstallProgram$" /SILENT /NORESTART

[Winbatch_uninstall_installshield]
"$UninstallProgram$" /s

[Winbatch_uninstall_nsis]
"$UninstallProgram$" /S
;-----------------------------------------------------

[Files_uninstall]
del -sf "$InstallDir$\"
;-----------------------------------------------------

Hier ist das Logfile welches nachdem angeblichen deinstallieren angelegt wurde.

Code: Alles auswählen



[1] [Nov 05 22:51:30:607] --
[1] [Nov 05 22:51:30:607] --
[1] [Nov 05 22:51:30:607] c:\opsi.org\log\\opsi-script-part-Ie07Tn40.log
[1] [Nov 05 22:51:30:608] opsi-script 4.12.1.5 started at >>
[1] [Nov 05 22:51:30:608] opsi-script log file with encoding utf8
[1] [Nov 05 22:51:30:608] startmessage opsi-script created at CentralForm.FormCreate: 05.11.2020 22:51:28
[1] [Nov 05 22:51:30:608] Loading skin from: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winstskin
[1] [Nov 05 22:51:30:608] Called with parameter: /opsiservice\r\nhttps://000.000.000.000:4447/rpc\r\n/clientid\r\nvm002..lan\r\n/username\r\nvm002..lan\r\n/password\r\n***(confidential)***
[1] [Nov 05 22:51:30:616] Depot path from readconfig:  p:\ 05.11.2020 22:51:28
[1] [Nov 05 22:51:30:617] startmessage StartProgramModes and create log: 05.11.2020 22:51:28
[1] [Nov 05 22:51:30:617] pm: 5 05.11.2020 22:51:28
[1] [Nov 05 22:51:30:617] startmessage start opsi service connection: 05.11.2020 22:51:28
[1] [Nov 05 22:51:30:617] startmessage: opsidata initialized: 05.11.2020 22:51:28
[1] [Nov 05 22:51:30:617] vm002..lan
[1] [Nov 05 22:51:30:617] Starting Servicecall: backend_info
[1] [Nov 05 22:51:30:617] Success Servicecall: backend_info
[1] [Nov 05 22:51:30:617] got AutoActivityDisplay: true
[1] [Nov 05 22:51:30:617] got debug_lib: false
[1] [Nov 05 22:51:30:617] got debug_prog: false
[1] [Nov 05 22:51:30:617] got default_loglevel: 7
[1] [Nov 05 22:51:30:617] got config: opsi-script.global.force_min_loglevel
[1] [Nov 05 22:51:30:617] got force_min_loglevel: 0
[1] [Nov 05 22:51:30:617] got ScriptErrorMessages: false
[1] [Nov 05 22:51:30:617] got w10BitlockerSuspendOnReboot: false
[1] [Nov 05 22:51:30:617] readConfigFromService: ok
[1] [Nov 05 22:51:30:617] startmessage create log: 05.11.2020 22:51:30
[1] [Nov 05 22:51:30:617] force_min_loglevel: 0
[1] [Nov 05 22:51:30:617] default_loglevel: 7
[1] [Nov 05 22:51:30:617] debug_prog: false
[1] [Nov 05 22:51:30:617] debug_lib: false
[7] [Nov 05 22:51:30:617] Testing as temp path: c:\opsi.org\tmp\
[7] [Nov 05 22:51:30:617] Succseeded: Testing as temp path: c:\opsi.org\tmp\
[7] [Nov 05 22:51:30:618] Final: Using as temp path: c:\opsi.org\tmp\
[7] [Nov 05 22:51:30:618] JSON service request https://000.000.000.000:4447/rpc getDepotId
[7] [Nov 05 22:51:30:867] JSON service request https://000.000.000.000:4447/rpc getProductOrdering
[7] [Nov 05 22:51:32:126] JSON service request https://000.000.000.000:4447/rpc productOnClient_getObjects
[1] [Nov 05 22:51:32:494] Computername:vm002..lan
[1] [Nov 05 22:51:32:494] Computername according to Environment Variable :VM002
[1] [Nov 05 22:51:32:494] opsi service URL https://000.000.000.000:4447
[6] [Nov 05 22:51:32:494] Depot path:  p:\
[6] [Nov 05 22:51:32:494] 
[7] [Nov 05 22:51:32:499] bootmode from registry: BKSTD
[6] [Nov 05 22:51:32:499] bootmode BKSTD
[6] [Nov 05 22:51:32:499] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [Nov 05 22:51:32:499] Resolved sequence of products (05.11.2020 22:51:32):
[6] [Nov 05 22:51:32:499] Product 16 	_office2016_de : uninstall
[6] [Nov 05 22:51:32:500] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[7] [Nov 05 22:51:32:500] JSON service request https://000.000.000.000:4447/rpc getProduct_hash
[7] [Nov 05 22:51:32:829] in TOpsi4Data.initProduct : _office2016_de
[7] [Nov 05 22:51:32:829] JSON service request https://000.000.000.000:4447/rpc productOnClient_getObjects
[6] [Nov 05 22:51:33:033] Actionrequest for product: _office2016_de is (original/actual): (uninstall / uninstall)
[6] [Nov 05 22:51:33:059] [_office2016_de] Actionrequest for Product: _office2016_de is: uninstall
[7] [Nov 05 22:51:33:059] [_office2016_de] JSON service request https://000.000.000.000:4447/rpc getProductProperties_hash
[7] [Nov 05 22:51:33:428] [_office2016_de] JSON service request https://000.000.000.000:4447/rpc getProduct_hash
[7] [Nov 05 22:51:33:754] [_office2016_de] in TOpsi4Data.initProduct : _office2016_de
[7] [Nov 05 22:51:33:754] [_office2016_de] JSON service request https://000.000.000.000:4447/rpc productOnClient_getObjects
[6] [Nov 05 22:51:33:931] [_office2016_de] scriptname: "uninstall.opsiscript", special path: "p:\_office2016_de\"
[1] [Nov 05 22:51:33:931] [_office2016_de] Prog: force_min_loglevel: 0
[1] [Nov 05 22:51:33:931] [_office2016_de] Prog: default_loglevel: 7
[1] [Nov 05 22:51:33:931] [_office2016_de] Prog: debug_prog: False
[1] [Nov 05 22:51:33:931] [_office2016_de] Prog: debug_lib: False
[1] [Nov 05 22:51:33:931] [_office2016_de] Prog: ScriptErrorMessages: False
[1] [Nov 05 22:51:33:931] [_office2016_de] Prog: AutoActivityDisplay: True
[6] [Nov 05 22:51:33:931] [_office2016_de] Using new Depot path:  p:\
[1] [Nov 05 22:51:33:974] [_office2016_de] 
[1] [Nov 05 22:51:33:974] [_office2016_de] ============ Version 4.12.1.5 script "p:\_office2016_de\uninstall.opsiscript"
[1] [Nov 05 22:51:33:974] [_office2016_de]              used script encoding: cp1252
[1] [Nov 05 22:51:33:974] [_office2016_de]              used system encoding: cp1252
[1] [Nov 05 22:51:33:974] [_office2016_de]              start: 2020-11-05  22:51:33
[1] [Nov 05 22:51:33:974] [_office2016_de]              installing product: _office2016_de_16-2.0
[1] [Nov 05 22:51:33:974] [_office2016_de]              on client named    "vm002..lan"
[1] [Nov 05 22:51:33:976] [_office2016_de]              loggedin user    "admin"
[1] [Nov 05 22:51:33:976] [_office2016_de]              opsi-script running as    "SYSTEM"
[1] [Nov 05 22:51:33:976] [_office2016_de]              opsi-script running with admin privileges
[1] [Nov 05 22:51:33:976] [_office2016_de]              opsi-script running in standard script mode
[1] [Nov 05 22:51:33:976] [_office2016_de] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Nov 05 22:51:33:976] [_office2016_de] system infos:
[1] [Nov 05 22:51:33:988] [_office2016_de] XX-XX-XX-XX-XX-XX  -  PC hardware address
[1] [Nov 05 22:51:33:988] [_office2016_de] vm002..lan  -  IP name
[1] [Nov 05 22:51:33:988] [_office2016_de] 000.000.000.000  -  IP address
[1] [Nov 05 22:51:33:988] [_office2016_de] DEU  -  System default locale
[7] [Nov 05 22:51:33:988] [_office2016_de] Registry started without redirection (64 Bit)
[7] [Nov 05 22:51:33:989] [_office2016_de] Registry started readonly
[7] [Nov 05 22:51:33:989] [_office2016_de] Registry started without redirection (64 Bit)
[6] [Nov 05 22:51:33:989] [_office2016_de] Registry key [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion]  opened
[6] [Nov 05 22:51:33:989] [_office2016_de] Key closed
[1] [Nov 05 22:51:33:989] [_office2016_de] MS Windows 10.0 64 Bit, Release: 2004, Edition: PRODUCT_PROFESSIONAL
[1] [Nov 05 22:51:33:989] [_office2016_de] opsi service version : 4
[1] [Nov 05 22:51:33:989] [_office2016_de] 
[7] [Nov 05 22:51:33:990] [_office2016_de] Registry started readonly
[7] [Nov 05 22:51:33:990] [_office2016_de] Registry started without redirection (64 Bit)
[6] [Nov 05 22:51:33:990] [_office2016_de] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [Nov 05 22:51:33:990] [_office2016_de] Key closed
[6] [Nov 05 22:51:34:048] [_office2016_de] opsi-script has version  4.12.1.5, required is : >= 4.11.3.3
[6] [Nov 05 22:51:34:049] [_office2016_de] Set  $LogDir$ = "c:\opsi.org\log"
[6] [Nov 05 22:51:34:050] [_office2016_de]   The value of the variable "$LogDir$" is now: "c:\opsi.org\log"
[6] [Nov 05 22:51:34:050] [_office2016_de] Set  $SetupType$ = "nsis"
[6] [Nov 05 22:51:34:050] [_office2016_de]   The value of the variable "$SetupType$" is now: "nsis"
[6] [Nov 05 22:51:34:050] [_office2016_de] Set  $ProductId$       = "_office2016_de"
[6] [Nov 05 22:51:34:050] [_office2016_de]   The value of the variable "$ProductId$" is now: "_office2016_de"
[6] [Nov 05 22:51:34:050] [_office2016_de] Set  $InstallDir$      = "C:\Program Files\Microsoft Office"
[6] [Nov 05 22:51:34:050] [_office2016_de]   The value of the variable "$InstallDir$" is now: "C:\Program Files\Microsoft Office"
[6] [Nov 05 22:51:34:050] [_office2016_de] Set  $LicenseRequired$ = "false"
[6] [Nov 05 22:51:34:050] [_office2016_de]   The value of the variable "$LicenseRequired$" is now: "false"
[6] [Nov 05 22:51:34:050] [_office2016_de] Set  $LicensePool$     = "p_" + $ProductId$
[6] [Nov 05 22:51:34:051] [_office2016_de]   The value of the variable "$LicensePool$" is now: "p__office2016_de"
[5] [Nov 05 22:51:34:051] [_office2016_de] comment: Show product picture
[5] [Nov 05 22:51:34:059] [_office2016_de] message Uninstalling _office2016_de ...
[6] [Nov 05 22:51:34:060] [_office2016_de] If
[6] [Nov 05 22:51:34:060] [_office2016_de]   Starting query if file exist ...
[6] [Nov 05 22:51:34:063] [_office2016_de]   FileExists("p:\_office2016_de\delsub.opsiscript")   <<< result true
[6] [Nov 05 22:51:34:063] [_office2016_de] Then
[5] [Nov 05 22:51:34:063] [_office2016_de]   comment: Start uninstall sub section
[7] [Nov 05 22:51:34:074] [_office2016_de]   Loaded sub from: p:\_office2016_de\delsub.opsiscript with encoding: cp1252
[6] [Nov 05 22:51:34:074] [_office2016_de]   
[6] [Nov 05 22:51:34:074] [_office2016_de]   ~~~~~~~ Start Sub ~~~~~~~  Sub "p:\_office2016_de\delsub.opsiscript"
[7] [Nov 05 22:51:34:077] [_office2016_de]   Found Include_append statement for: p:\_office2016_de\check_nsis_exitcode.opsiscript
[6] [Nov 05 22:51:34:086] [_office2016_de]   Included (append) file: p:\_office2016_de\check_nsis_exitcode.opsiscript with encoding: cp1252
[6] [Nov 05 22:51:34:087] [_office2016_de]   Set  $found$     = "false"
[6] [Nov 05 22:51:34:087] [_office2016_de]     The value of the variable "$found$" is now: "false"
[6] [Nov 05 22:51:34:087] [_office2016_de]   Set  $MsiId$     = ''
[6] [Nov 05 22:51:34:087] [_office2016_de]     The value of the variable "$MsiId$" is now: ""
[5] [Nov 05 22:51:34:087] [_office2016_de]   message Uninstalling _office2016_de ...
[6] [Nov 05 22:51:34:087] [_office2016_de]   If
[7] [Nov 05 22:51:34:088] [_office2016_de]     $SetupType$ = "advancedmsi"   <<< result false
[7] [Nov 05 22:51:34:088] [_office2016_de]     $SetupType$ = "installshieldmsi" or $SetupType$ = "advancedmsi"   <<< result false
[7] [Nov 05 22:51:34:088] [_office2016_de]     $SetupType$ = "msi" or $SetupType$ = "installshieldmsi" or $SetupType$ = "advancedmsi"   <<< result false
[6] [Nov 05 22:51:34:088] [_office2016_de]     ($SetupType$ = "msi" or $SetupType$ = "installshieldmsi" or $SetupType$ = "advancedmsi")   <<< result false
[6] [Nov 05 22:51:34:088] [_office2016_de]   Then
[6] [Nov 05 22:51:34:088] [_office2016_de]     If
[6] [Nov 05 22:51:34:088] [_office2016_de]     Then
[6] [Nov 05 22:51:34:088] [_office2016_de]       If
[6] [Nov 05 22:51:34:088] [_office2016_de]       Then
[6] [Nov 05 22:51:34:088] [_office2016_de]       EndIf
[6] [Nov 05 22:51:34:089] [_office2016_de]     EndIf
[6] [Nov 05 22:51:34:089] [_office2016_de]     If
[6] [Nov 05 22:51:34:089] [_office2016_de]     Then
[6] [Nov 05 22:51:34:089] [_office2016_de]       If
[6] [Nov 05 22:51:34:089] [_office2016_de]       Then
[6] [Nov 05 22:51:34:089] [_office2016_de]       EndIf
[6] [Nov 05 22:51:34:089] [_office2016_de]     EndIf
[6] [Nov 05 22:51:34:089] [_office2016_de]   EndIf
[6] [Nov 05 22:51:34:090] [_office2016_de]   If
[7] [Nov 05 22:51:34:090] [_office2016_de]     $SetupType$ = "inno"   <<< result false
[6] [Nov 05 22:51:34:090] [_office2016_de]     ($SetupType$ = "inno")   <<< result false
[6] [Nov 05 22:51:34:090] [_office2016_de]   Then
[6] [Nov 05 22:51:34:090] [_office2016_de]     If
[6] [Nov 05 22:51:34:090] [_office2016_de]     Then
[6] [Nov 05 22:51:34:090] [_office2016_de]     EndIf
[6] [Nov 05 22:51:34:090] [_office2016_de]   EndIf
[6] [Nov 05 22:51:34:091] [_office2016_de]   If
[7] [Nov 05 22:51:34:091] [_office2016_de]     $SetupType$ = "installshield"   <<< result false
[6] [Nov 05 22:51:34:091] [_office2016_de]     ($SetupType$ = "installshield")   <<< result false
[6] [Nov 05 22:51:34:091] [_office2016_de]   Then
[6] [Nov 05 22:51:34:091] [_office2016_de]     If
[6] [Nov 05 22:51:34:091] [_office2016_de]     Then
[6] [Nov 05 22:51:34:091] [_office2016_de]     EndIf
[6] [Nov 05 22:51:34:091] [_office2016_de]   EndIf
[6] [Nov 05 22:51:34:092] [_office2016_de]   If
[7] [Nov 05 22:51:34:092] [_office2016_de]     $SetupType$ = "nsis"   <<< result true
[6] [Nov 05 22:51:34:092] [_office2016_de]     ($SetupType$ = "nsis")   <<< result true
[6] [Nov 05 22:51:34:092] [_office2016_de]   Then
[6] [Nov 05 22:51:34:092] [_office2016_de]     Set  $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
[6] [Nov 05 22:51:34:092] [_office2016_de]       The value of the variable "$UninstallProgram$" is now: "C:\Program Files\Microsoft Office\uninstall.exe"
[6] [Nov 05 22:51:34:092] [_office2016_de]     If
[7] [Nov 05 22:51:34:092] [_office2016_de]       $InstallDir$ = ''   <<< result false
[7] [Nov 05 22:51:34:092] [_office2016_de]       not($InstallDir$ = '')   <<< result true
[6] [Nov 05 22:51:34:092] [_office2016_de]       Starting query if file exist ...
[6] [Nov 05 22:51:34:092] [_office2016_de]         "C:\Program Files\Microsoft Office\uninstall.exe":
[7] [Nov 05 22:51:34:092] [_office2016_de]       FileExists($UninstallProgram$)   <<< result false
[6] [Nov 05 22:51:34:092] [_office2016_de]       (not($InstallDir$ = '')) and FileExists($UninstallProgram$)   <<< result false
[6] [Nov 05 22:51:34:093] [_office2016_de]     Then
[6] [Nov 05 22:51:34:093] [_office2016_de]     EndIf
[6] [Nov 05 22:51:34:093] [_office2016_de]   EndIf
[6] [Nov 05 22:51:34:093] [_office2016_de]   If
[7] [Nov 05 22:51:34:093] [_office2016_de]     $InstallDir$ = ''   <<< result false
[7] [Nov 05 22:51:34:093] [_office2016_de]     not($InstallDir$ = '')   <<< result true
[7] [Nov 05 22:51:34:093] [_office2016_de]     $InstallDir$ = "not used"   <<< result false
[7] [Nov 05 22:51:34:093] [_office2016_de]     not($InstallDir$ = "not used")   <<< result true
[7] [Nov 05 22:51:34:093] [_office2016_de]     (not($InstallDir$ = "not used"))   <<< result true
[6] [Nov 05 22:51:34:093] [_office2016_de]     (not($InstallDir$ = '')) and (not($InstallDir$ = "not used"))   <<< result true
[6] [Nov 05 22:51:34:093] [_office2016_de]   Then
[5] [Nov 05 22:51:34:094] [_office2016_de]     Execution of: Files_uninstall
[5] [Nov 05 22:51:34:094] [_office2016_de]     
[7] [Nov 05 22:51:34:094] [_office2016_de]       del -sf "C:\Program Files\Microsoft Office\"
[6] [Nov 05 22:51:34:094] [_office2016_de]         Search "C:\Program Files\Microsoft Office\"
[6] [Nov 05 22:51:34:094] [_office2016_de]           Search "C:\Program Files\Microsoft Office\CLIPART\"
[6] [Nov 05 22:51:34:095] [_office2016_de]             Search "C:\Program Files\Microsoft Office\CLIPART\PUB60COR\"
[6] [Nov 05 22:51:34:097] [_office2016_de]             Search "C:\Program Files\Microsoft Office\CLIPART\PUB60COR\*.*"
[6] [Nov 05 22:51:35:832] [_office2016_de]                   File "C:\Program Files\Microsoft Office\Office16\ADDINS\Microsoft Power Query for Excel Integrated\bin\pt-BR\Microsoft.Mashup.Client.Windows.resources.dll"
[6] [Nov 05 22:51:35:832] [_office2016_de]                     The file has been deleted
[6] [Nov 05 22:51:35:832] [_office2016_de]                   File "C:\Program Files\Microsoft Office\Office16\ADDINS\Microsoft Power Query for Excel Integrated\bin\pt-BR\Microsoft.Mashup.Document.resources.dll"
[6] [Nov 05 22:51:35:833] [_office2016_de]                     The file has been deleted
#### Kilometer lange liste was alles gefunden und gelöscht wurde ####
[6] [Nov 05 22:51:43:400] [_office2016_de]   EndIf
[6] [Nov 05 22:51:43:403] [_office2016_de]   Section ending since next line is starting with "["
[6] [Nov 05 22:51:43:403] [_office2016_de]   
[6] [Nov 05 22:51:43:403] [_office2016_de]   ~~~~~~~ End Sub   ~~~~~~~  Sub "p:\_office2016_de\delsub.opsiscript"
[6] [Nov 05 22:51:43:403] [_office2016_de]   
[6] [Nov 05 22:51:43:403] [_office2016_de] EndIf
[6] [Nov 05 22:51:43:403] [_office2016_de] If
[6] [Nov 05 22:51:43:403] [_office2016_de]   $LicenseRequired$ = "true"   <<< result false
[6] [Nov 05 22:51:43:403] [_office2016_de] Then
[6] [Nov 05 22:51:43:403] [_office2016_de] EndIf
[1] [Nov 05 22:51:43:403] [_office2016_de] ___________________
[1] [Nov 05 22:51:43:403] [_office2016_de] script finished: success
[1] [Nov 05 22:51:43:403] [_office2016_de] 0 errors
[1] [Nov 05 22:51:43:403] [_office2016_de] 0 warnings
[1] [Nov 05 22:51:43:403] [_office2016_de] 
[1] [Nov 05 22:51:43:403] [_office2016_de] installed product: _office2016_de Version: 16-2.0
[1] [Nov 05 22:51:43:403] [_office2016_de] 
[7] [Nov 05 22:51:43:405] [_office2016_de] BuildPC: update switches .....
[7] [Nov 05 22:51:43:405] [_office2016_de] JSON service request https://000.000.000.000:4447/rpc productOnClient_updateObject
[7] [Nov 05 22:51:43:597] Registry started with redirection (32 Bit)
[6] [Nov 05 22:51:43:597] Registry key [HKLM\SOFTWARE\opsi.org\winst]  opened
[6] [Nov 05 22:51:43:597]                   Variable "RebootRequested"  is keeping its value "0"
[6] [Nov 05 22:51:43:597]                   Variable "LastLogFilename"  is keeping its value "c:\opsi.org\log\opsi-script.log"
[6] [Nov 05 22:51:43:597]                   Variable "ContinueLogFile"  is keeping its value "0"
[6] [Nov 05 22:51:43:597]                   Variable "NumberOfErrors"  is keeping its value "0"
[6] [Nov 05 22:51:43:633]                   Key flushed
[6] [Nov 05 22:51:43:633]                   Key closed
[5] [Nov 05 22:51:43:638] -------- submitted part of log file ends here, see the rest of log file on client ----------
Alle Office Icons sind im Startmenü zu sehen und startbar, obwohl Opsi sagt das erfolgreich deinstalliert ist.
Unter Systemsteuerung --> Programme und Features ist der Eintrag Microsoft Office Professional Plus 2016 zu sehen. Wenn ich hier mit der Rechten Maus taste klicke und auf deinstallieren klicke wird das Office Vollständig deinstalliert.
Benutzeravatar
SisterOfMercy
Beiträge: 1556
Registriert: 22 Jun 2012, 19:18

Re: Uninstall von Office2016 nicht vollständig möglich

Beitrag von SisterOfMercy »

You are trying to do a nsis uninstall. The office installer is not nsis. You can see from the logfile that it is looking for uninstall.exe, but that the file does not exist.

This is not perfect but it works:

Code: Alles auswählen


Set $MsiId32$ = '{90160000-0012-0000-0000-0000000FF1CE}'
Set $MsiId64$ = '{90160000-0012-0000-1000-0000000FF1CE}'

if ($INST_SystemType$ = "x86 System") 
	Message "Uninstalling " + $ProductId$ + "..."
	
	if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
		comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
		Winbatch_uninstall_32
		sub_check_exitcode
	endif
	
	comment "Delete files"
	Files_uninstall_32 /32Bit
	Files_uninstall_AllProfiles /AllNtUserProfiles	
	comment "Cleanup registry"
	Registry_uninstall /32Bit
;	Registry_uninstall_AllProfiles /AllNTUserDats
endif

if ($INST_SystemType$ = "64 Bit System") 
	Message "Uninstalling " + $ProductId$ + "..."
	
	if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
		comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
		Winbatch_uninstall_64
		sub_check_exitcode
	endif

	if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
		comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
		Winbatch_uninstall_32
		sub_check_exitcode
	endif

	comment "Delete files"
	Files_uninstall_64 /64Bit
	Files_uninstall_AllProfiles /AllNtUserProfiles	
	comment "Cleanup registry"
	Registry_uninstall /64Bit
;	Registry_uninstall_AllProfiles /AllNTUserDats
endif

comment "Delete program shortcuts"
LinkFolder_uninstall

[Winbatch_uninstall_32]
"%ScriptPath%\files\x86\setup.exe" /uninstall Standard /config "%ScriptPath%\files\x86\standard.ww\uninstall.xml"

[Winbatch_uninstall_64]
"%ScriptPath%\files\x64\setup.exe" /uninstall Standard /config "%ScriptPath%\files\x64\standard.ww\uninstall.xml"

[Winbatch_uninstall_msi_32]
"%SystemRoot%\system32\msiexec.exe" /x $MsiId32$ /qb-! /l*v "$LogDir$\$ProductId$-uninstall.log" REBOOT=ReallySuppress

[Winbatch_uninstall_msi_64]
"%SystemRoot%\system32\msiexec.exe" /x $MsiId64$ /qb-! /l*v "$LogDir$\$ProductId$-uninstall.log" REBOOT=ReallySuppress

[Files_uninstall_32]
delete -sf "$InstallDir32$\"

[Files_uninstall_64]
delete -sf "$InstallDir64$\"

[Files_uninstall_AllProfiles]
delete -f "%UserProfileDir%\Application Data\Microsoft\Internet Explorer\Quick Launch\Microsoft Outlook.lnk"

[Registry_uninstall]
; Example of deleting a registry key:
;
; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]

[Registry_uninstall_AllProfiles]


[LinkFolder_uninstall]
set_basefolder common_programs
delete_subfolder "Microsoft Office 2016"

[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
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten