====== TeamViewer 8 ====== Tested with opsi 4.0.3\\ requiredWinstVersion >= 4.11.3.6\\ By //MathiasM 2013/08/07 16:40// Files can be downloaded at http://www.teamviewer.com/de/download/msi.aspx Tree:\\ setup.ins uninstall.ins subuninstall.ins TeamViewer_Host.msi TeamViewer_Settings.reg logo.png === setup.ins === ; Mathias Merscher 2013 [Actions] requiredWinstVersion >= "4.11.3.6" setLogLevel = 6 TraceMode = off DefVar $OS$ DefVar $NTVersion$ DefVar $SystemType$ DefVar $ProductName$ DefVar $ProductNameFull$ DefVar $ProductPicture$ DefVar $Executable32$ DefVar $Executable64$ DefVar $ExitCode$ DefVar $MsiId32$ DefVar $MsiId64$ DefVar $TempDir$ set $OS$ = GetOS set $NTVersion$ = GetNTVersion Set $SystemType$ = GetSystemType Set $TempDir$ = "C:\tmp" ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- set $ProductNameFull$ = "TeamViewer 8 Host" Set $ProductPicture$ = "logo.png" Set $Executable32$ = "TeamViewer_Host.msi" Set $Executable64$ = "TeamViewer_Host.msi" Set $MsiId32$ = '{0EE6CD1A-DBCC-4B8D-971A-539A117ABC30}' Set $MsiId64$ = '{0EE6CD1A-DBCC-4B8D-971A-539A117ABC30}' ; ---------------------------------------------------------------- ; Show $ProductPicture$ and $ProductNameFull$ ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductNameFull$ Message "Installiere "+$ProductNameFull$ if not (HasMinimumSpace ("%SYSTEMDRIVE%", "50 MB")) LogError "Nicht genĂ¼gend Platz auf %SYSTEMDRIVE%" isFatalError endif ; Deinstall old Version Sub "%ScriptPath%\subuninstall.ins" Message "Installiere " + $ProductNameFull$ + " ..." if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" ) if $SystemType$ = "x86 System" Files_copy_local Winbatch_Install_32-Bit sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" Files_del endif if $SystemType$ = "64 Bit System" Files_copy_local Winbatch_Install_64-Bit sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" Files_del endif else LogError "Kein kompatibles Betriebssystem installiert" isFatalError endif [Files_copy_local] copy "%scriptpath%\TeamViewer_Host.msi" "$TempDir$\." copy "%scriptpath%\TeamViewer_Settings.reg" "$TempDir$\." [Winbatch_Install_32-Bit] msiexec /i "$TempDir$\$Executable32$" /quiet /norestart [Winbatch_Install_64-Bit] msiexec /i "$TempDir$\$Executable64$" /quiet /norestart [Files_del] delete "$TempDir$\TeamViewer_Host.msi" delete "$TempDir$\TeamViewer_Settings.reg" ===uninstall.ins=== ; Mathias Merscher 2013 [Actions] requiredWinstVersion >= "4.11" setLogLevel = 6 TraceMode = off DefVar $MsiId32$ DefVar $MsiId64$ DefVar $LogDir$ DefVar $ExitCode$ DefVar $ProductNameFull$ DefVar $ProductPicture$ DefVar $OS$ DefVar $NTVersion$ DefVar $SystemType$ set $OS$ = GetOS set $NTVersion$ = GetNTVersion Set $SystemType$ = GetSystemType ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- Set $ProductNameFull$ = "TeamViewer 8 Host" Set $ProductPicture$ = "logo.png" Set $MsiId32$ = '{0EE6CD1A-DBCC-4B8D-971A-539A117ABC30}' Set $MsiId64$ = '{0EE6CD1A-DBCC-4B8D-971A-539A117ABC30}' ; ---------------------------------------------------------------- comment "Display product logo" ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductNameFull$ Message "Deinstalliere " + $ProductNameFull$ + " ..." if FileExists("%ScriptPath%\subuninstall.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\subuninstall.ins" endif ===subuninstall.ins=== ; Mathias Merscher 2013 Message "Deinstalliere " + $ProductNameFull$ + " ..." ;OS-Version ermitteln if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" ) comment "checking for old installation (32bit)" 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_msi32 sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" endif if $SystemType$ = "64 Bit System" comment "checking for old installation (64bit)" 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_msi64 sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" endif endif else LogError "Kein kompatibles Betriebssystem installiert" isFatalError endif [Winbatch_uninstall_msi32] msiexec /x $MsiId32$ /quiet REBOOT=ReallySuppress [Winbatch_uninstall_msi64] msiexec /x $MsiId64$ /quiet REBOOT=ReallySuppress