help with teamviewer 14 host

Antworten
smallengineguy2014
Beiträge: 9
Registriert: 09 Jul 2019, 22:41

help with teamviewer 14 host

Beitrag von smallengineguy2014 »

i have read and just don't get what i am doing wrong but here is what i got

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      msi
;****************************************
; PRODUCTID      teamviewer-14-host
; SETUPFILE      TeamViewer_Host.msi
;****************************************
; LICENSE        false     
; PRODUCTDESC    TeamViewer 14 Host

; PRODUCTNAME    TeamViewer 14 Host
; PRODUCTSIZE    138 MB
; PRODUCTVER     14.4.2669.0
;****************************************
; SETUPSCRIPT    setup.opsiscript
; UNINSSCRIPT    uninstall.opsiscript
;****************************************
; MSIID          {E2E6679F-3BF1-4063-9CF0-848E9B826DDF}
; USE-MST        
; INSTALLDIR     (not used)
;****************************************
; TIMESTAMP      7/18/2019 5:43:22
;****************************************

[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_msi_exitcode.opsiscript"

; ----------------------------------------------------------------
Set $SetupType$       = "msi"
; ----------------------------------------------------------------

; $ProductId$ is the name of the product in opsi, only lower letters, no umlauts, no white spaces, use '-' as a seperator
Set $ProductId$       = "teamviewer-14-host"
Set $Setupfile$       = "TeamViewer_Host.msi"
; the path where we find the product after the installation
Set $InstallDir$      = "(not used)"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $MsiId$           = "{E2E6679F-3BF1-4063-9CF0-848E9B826DDF}"
Set $MinimumSpace$    = "138 MB"
; ----------------------------------------------------------------
; ----------------------------------------------------------------

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

   
   comment "Start setup program"
   ChangeDirectory "%SCRIPTPATH%"
   ;----------------------------------------------
   Winbatch_install_msi
   ;----------------------------------------------
   Sub_check_exitcode	
endif


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

[Winbatch_install_msi]
msiexec /i "%ScriptPath%\TeamViewer_Host.msi"  /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 REBOOT=ReallySuppress

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


[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

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

that will install but i am trying to pass a argument to the installer to load a mass deployment token

here is the documentation from teamviewer on what has to happen

https://community.teamviewer.com/t5/Kno ... ta-p/39639

thanks for your input and thoughts on doing this

it would be nice if we was able to have a fill in box on the admin tool to change the token when we need it :D :D
Benutzeravatar
ThomasT
uib-Team
Beiträge: 529
Registriert: 26 Jun 2013, 12:26

Re: help with teamviewer 14 host

Beitrag von ThomasT »

Why don't you just pass the argument?
On the website you mentioned you can find the following command:

Code: Alles auswählen

msiexec.exe /i "Path\To\TeamViewer_Host.msi>" /qn CUSTOMCONFIGID=<YOUR_CUSTOMCONFIG_ID> 
Have you tried adapting the Winbatch_install_msi section like that?
Kein Support per DM!
_________________________
opsi support - https://www.uib.de/
For productive opsi installations we recommend support contracts.
Antworten