Registrywerte mit übergeben
Verfasst: 12 Sep 2018, 13:33
Moin, Moin,
nachdem ich nun seit Montag morgen ausschließlich damit beschäftigt bin den Teamviewer irgend wie in Opsi einzupflegen und es doch nicht hin bekomme, muss ich einfach jetzt hier fragen:
Mit dem Opsi-Setup-Detektor habe ich den Teamviewer ruck-zuck installiert bekommen. Allerdings kann man dem Teamviewer auch exportierte Einstellungen in Form von Registry-werten mit übergeben. Genau hier scheitere ich. Ich habe die Handbücher und das Forum hoch und runter gelesen.
Versucht habe ich das hier:
und das hier:
oder das hier:
nicht funktioniert!
Kann mir hier jemand nen Tipp geben was ich falsch mache? Einzig wenn ich die TeamViewer_Settings.reg direkt auf dem System ausführe,- dann funktioniert das.
Danke und Gruß aus Hamburg
nachdem ich nun seit Montag morgen ausschließlich damit beschäftigt bin den Teamviewer irgend wie in Opsi einzupflegen und es doch nicht hin bekomme, muss ich einfach jetzt hier fragen:
Mit dem Opsi-Setup-Detektor habe ich den Teamviewer ruck-zuck installiert bekommen. Allerdings kann man dem Teamviewer auch exportierte Einstellungen in Form von Registry-werten mit übergeben. Genau hier scheitere ich. Ich habe die Handbücher und das Forum hoch und runter gelesen.
Versucht habe ich das hier:
Code: Alles auswählen
[winbatch_regedit]
"%SystemRoot%\system32\regedit.exe" /s "%ScriptPath%\TeamViewer_Settings.reg"
Code: Alles auswählen
[Registry_install]
openkey [HKEY_CURRENT_USER\SOFTWARE\WOW6432Node\TeamViewer]
set "MinimizeToTray"=dword:00000001
Code: Alles auswählen
registry loadUnicodeTextFile("%scriptpath%/TeamViewer_Settings.reg") /regedit
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-13
; SETUPFILE TeamViewer.msi
;****************************************
; LICENSE false
; PRODUCTDESC TeamViewer 13
; PRODUCTNAME TeamViewer 13
; PRODUCTSIZE 122 MB
; PRODUCTVER 13.2.14327
;****************************************
; SETUPSCRIPT setup.opsiscript
; UNINSSCRIPT uninstall.opsiscript
;****************************************
; MSIID {2643D545-C819-4E31-9078-8BA0277AA05C}
; USE-MST
; INSTALLDIR (not used)
;****************************************
; TIMESTAMP 11.09.2018 08:32:49
;****************************************
[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-13"
Set $Setupfile$ = "TeamViewer.msi"
; the path where we find the product after the installation
Set $InstallDir$ = "(not used)"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
Set $MsiId$ = "{2643D545-C819-4E31-9078-8BA0277AA05C}"
Set $MinimumSpace$ = "122 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.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb-! ALLUSERS=1 REBOOT=ReallySuppress
registry loadUnicodeTextFile("%scriptpath%/TeamViewer_Settings.reg") /regedit
[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
; ----------------------------------------------------------------
; ----------------------------------------------------------------
Danke und Gruß aus Hamburg