Verknüpfungen verteilen (gelöst)

Antworten
maxi_ybl
Beiträge: 15
Registriert: 29 Dez 2022, 14:34

Verknüpfungen verteilen (gelöst)

Beitrag von maxi_ybl »

Moin,

ich versuche gerade viele Installations / Verteilungsjobs von unserem alten Deploymentsystem nach Opsi zu übertragen.
Bei den meisten Softwareinstallationen ist das auch mit der anpassung von einigen Skripten gelungen.

Meine Frage wäre ob es mit Opsi auch eine einfache Möglichkeit gibt Internetverknüpfungen oder Softwareverknüpfungen (Server) mit Opsi zu verteilen.
Hatte schon versucht ob ich mit dem SetupDetector etwas tricksen kann auch wenn es keine Setup Datei gibt (ohne Erfolg). Meine Frage wäre muss ich jetzt für jede Verknüpfung ein neues Skript bauen oder gibt es dafür eventuell Templates bzw kann man das mit dem PacketBuilder machen.
Zuletzt geändert von maxi_ybl am 19 Okt 2023, 12:20, insgesamt 1-mal geändert.
feltel
Beiträge: 222
Registriert: 09 Dez 2014, 07:22

Re: Verknüpfungen verteilen

Beitrag von feltel »

Mit OPSI Verknüpfungen zu erzeugen (oder zu löschen) ist mit OPSI kein Ding. Das geht innerhalb eines OPSI-Skipts mit "LinkFolder". Siehe auch https://download.uib.de/opsi_stable/doc ... linkfolder

kleines Beispiel:

Code: Alles auswählen

[LinkFolder_FooBar_Common]
set_basefolder common_programs
set_subfolder "FooBar"

set_link
  name: Technikproblem melden
  target: https://foo.bar.com/open.php
  parameters:
  working_dir:
  icon_file: %ProgramFilesSysnativeDir%\foobar\foobar.ico
  icon_index:
end_link
... erzeugt einen Link im Startmenü zu einer Webseite. Das gleiche geht auch mit "klassischen" Linkzielen wie EXE-Files, CMD-Skripte, ....
maxi_ybl
Beiträge: 15
Registriert: 29 Dez 2022, 14:34

Re: Verknüpfungen verteilen

Beitrag von maxi_ybl »

Danke für die schnelle Antwort! :D

Das hat aufjedenfall schonmal rein zum Verständnis weitergeholfen.
Ich habe in Folge dessen noch etwas weiter probiert (dazu sei gesagt Skrits ansich sind bei mir noch schwierig).
Beim testen bin ich davon ausgegangen das ich jeweils das Template von dem Script Handbuch anpasse und das dann in ein Paket einfüge.
BSP
ich möchte eine Verknüpfung zu https://seak.l-t.de/msp/login.aspx auf dem Desktop erstellen und das dann über den Config Editor verteilen.
Dann gehe ich in den SetupDetector und erstelle mir ein Template
Ersetze dann das "Setup" Skript mit dem Skript
; ----------------------------------------------------------------
; This is a opsi-script file.
; See https://opsi.org https://uib.de
; This code was originally created by opsi-setup-detector 4.2.1.17
; ----------------------------------------------------------------
encoding=utf8

[Actions]
requiredOpsiscriptVersion >= "4.12.4.23"

importlib "uib_exitcode.opsiscript"
importlib "osd-lib.opsiscript"

; ----------------------------------------------------------------
[LinkFolder_verknuepfungen]
set_basefolder desktop
set_subfolder "seakmsp"

set_link
name: seakmsp
target: https://seak.l-t.de/msp/login.aspx
parameters:
working_dir:
icon_file:
icon_index:
end_link

Nach meinem Verständnis müsste doch in dem Ordner verknuepfungen auf dem Desktop eine Verknüpfung zu der Website "" erstellt werden.

Wenn ich das Paket dann mit dem Package Builder packe , installiere und dann über den Editor ausrolle geht die Installation ohne Problme durch aber es wird keine Verknüpfung erstellt.
thomas.besser
Beiträge: 461
Registriert: 09 Sep 2009, 09:40

Re: Verknüpfungen verteilen

Beitrag von thomas.besser »

Du müsstest die Anweisung der sekundären Sektion [LinkFolder_verknuepfungen] auch noch in der primären Sektion zur Ausführung bringen.

Sprich unterhalb der 'importlib' Anweisungen ein 'LinkFolder_verknuepfungen' einfügen.

Siehe auch https://download.uib.de/opsi_stable/doc ... y-sections
maxi_ybl
Beiträge: 15
Registriert: 29 Dez 2022, 14:34

Re: Verknüpfungen verteilen

Beitrag von maxi_ybl »

Hi ich bin es nochmal, da ich immernoch keinen Erfolg hatte.
Ich habe mir Die diversen Dokus und Anleitungen durchgelesen aber bei mir möchte es einfach nicht die Verknüpfung erstellen.
Zunächst habe ich es ganz Simple versucht :

Code: Alles auswählen

[Actions] 
requiredWinstVersion >= "4.10.8.6"
LinkFolder_Setup

;----------------------
[LinkFolder_Setup]
set_basefolder common_desktopdirectory
set_subfolder "seakmsp"

set_link
  name: "seakmsp" 
  target: "https://seak.l-t.de/msp/login.aspx"
  parameters:
  working_dir:
  icon_file:
  icon_index:
end_link
Aber ohne Erfolg (keine Aktion gesetzt) Für mein Verständnis war die Aktion Überprüfe Version und dann führe Linkfolder_Setup aus, wodurch auf dem Desktop bei allen Nutzern eine Verknüpfung zu der Website seak.l-t.de erstellt wird.

Dann dachte ich gut vlt brauch ich mehr in Actions und hab das Opsi Template kopiert und "Linkfolder" ausgeklammert und die Parameter bestimmt bzw weise das nicht benötigte gelöscht. Ich weiß ehrlich gesagt nicht mehr wo mein denkfehler ist.

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/credits/
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $MsiId$
DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts, 
; no white space use '-' as a seperator
Set $ProductId$       = "seakmsp"
Set $MinimumSpace$    = "200 MB"
; the path were we find the product after the installation
;Set $InstallDir$      = "%ProgramFiles32Dir%\<path to the product>"
;Set $LicenseRequired$ = "false"
;Set $LicensePool$     = "p_" + $ProductId$
; ----------------------------------------------------------------
 
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
	isFatalError
	; Stop process and set installation status to failed
else
	comment "Show product picture"
	ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
 
	if FileExists("%ScriptPath%\delsub32.ins")
		comment "Start uninstall sub section"
		Sub "%ScriptPath%\delsub32.ins"
	endif
 
	Message "Installing " + $ProductId$ + " ..."

 
	comment "Create shortcuts"
	LinkFolder_install
 
	comment "Test for installation success"
	; Test if software marked as installed in registry
	; if (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] DisplayName") = "")
	; 	logError "Fatal: After Installation 32 bit [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] not found"
	; 	isFatalError
	; else
	; 	comment "Successful Installation"
	; endif
 
endif
 
[Winbatch_install]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
; "%ScriptPath%\Setup.exe" /S
;
; === MSI package =======================================================================================
; You may use the parameter PIDKEY=$Licensekey$
; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
;
; === InstallShield + MSI=====================================================================================
; Attention: The path to the log file should not contain any whitespaces
; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
;
; === InstallShield =====================================================================================
; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
;
; === Inno Setup ========================================================================================
; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
; You may create setup answer file by: setup.exe /SAVEINF="filename"
; You may use an answer file by the parameter /LOADINF="filename"
; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES
 
[Files_install]
; Example of recursively copying some files into the installation directory:
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir$"
 
[Registry_install]
; Example of setting some values of an registry key:
;
; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
; set "name1" = "some string value"
; set "name2" = REG_DWORD:0001
; set "name3" = REG_BINARY:00 af 99 cd
 
[LinkFolder_install]
; Example of deleting a folder from AllUsers startmenu:
;
; set_basefolder common_programs
; delete_subfolder $ProductId$
;
; Example of creating an shortcut to the installed exe in AllUsers startmenu:
;
 set_basefolder common_desktopdirectory
 set_subfolder ""

 set_link
 	name: $ProductId$
 	target: "https://seak.l-t.de/msp/login.aspx"
 	parameters:
 	working_dir:
 	icon_file:
 	icon_index:
 end_link
;
; Example of creating an shortcut to the installed exe on AllUsers desktop:
;
; set_basefolder common_desktopdirectory
; set_subfolder ""
;
; set_link
; 	name: $ProductId$
; 	target: <path to the program>
; 	parameters: <some_param>
; 	working_dir: $InstallDir$
; 	icon_file: <path to icon file>
; 	icon_index: 2
; end_link
 
;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
 
 
[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
thomas.besser
Beiträge: 461
Registriert: 09 Sep 2009, 09:40

Re: Verknüpfungen verteilen

Beitrag von thomas.besser »

maxi_ybl hat geschrieben: 30 Jun 2023, 14:32 Zunächst habe ich es ganz Simple versucht :

Code: Alles auswählen

[Actions] 
requiredWinstVersion >= "4.10.8.6"
LinkFolder_Setup

;----------------------
[LinkFolder_Setup]
set_basefolder common_desktopdirectory
set_subfolder "seakmsp"

set_link
  name: "seakmsp" 
  target: "https://seak.l-t.de/msp/login.aspx"
  parameters:
  working_dir:
  icon_file:
  icon_index:
end_link
Aber ohne Erfolg (keine Aktion gesetzt) Für mein Verständnis war die Aktion Überprüfe Version und dann führe Linkfolder_Setup aus, wodurch auf dem Desktop bei allen Nutzern eine Verknüpfung zu der Website seak.l-t.de erstellt wird.
Dann poste doch bitte mal das Logfile dieses ^^^ "simplen" Skriptes.
maxi_ybl
Beiträge: 15
Registriert: 29 Dez 2022, 14:34

Re: Verknüpfungen verteilen

Beitrag von maxi_ybl »

[1] [2023-07-03 12:03:32.029] [] opsi-script 4.12.9.1 started at >>
[1] [2023-07-03 12:03:32.029] [] opsi-script log file with encoding utf8
[1] [2023-07-03 12:03:32.029] [] ssl library path: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-script\libssl-1_1.dll
[1] [2023-07-03 12:03:32.029] [] ssl library path: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-script\libcrypto-1_1.dll
[1] [2023-07-03 12:03:32.029] [] Load library: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-script\libcrypto-1_1.dll
[1] [2023-07-03 12:03:32.030] [] Load library: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-script\libssl-1_1.dll
[1] [2023-07-03 12:03:32.030] [] startmessage opsi-script created at CentralForm.FormCreate: 03.07.2023 12:03:31
[1] [2023-07-03 12:03:32.030] [] Detected Language is:de
[1] [2023-07-03 12:03:32.030] [] Called with parameter: /opsiservice\r\nhttps://opsiserver.Domain:4447/rpc\r\n/clientid\r\nNamePC2.Domain\r\n/username\r\nNamePC2.Domain\r\n/password\r\n***(confidential)***
[1] [2023-07-03 12:03:32.030] [] Depot path from readconfig: p:\ 03.07.2023 12:03:31
[1] [2023-07-03 12:03:32.030] [] startmessage StartProgramModes and create log: 03.07.2023 12:03:31
[1] [2023-07-03 12:03:32.030] [] Compiled with FPC: 3.2.2 for: Win32-i386
[1] [2023-07-03 12:03:32.030] [] pm: 5 03.07.2023 12:03:31
[1] [2023-07-03 12:03:32.030] [] Loading skin from: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-script\skin
[1] [2023-07-03 12:03:32.030] [] startmessage start opsi service connection: 03.07.2023 12:03:31
[1] [2023-07-03 12:03:32.030] [] startmessage: opsidata initialized: 03.07.2023 12:03:31
[1] [2023-07-03 12:03:32.030] [] NamePC2.Domain
[1] [2023-07-03 12:03:32.030] [] Starting Servicecall: backend_info
[1] [2023-07-03 12:03:32.030] [] Success Servicecall: backend_info
[1] [2023-07-03 12:03:32.030] [] got clientconfig.depot.user
[1] [2023-07-03 12:03:32.030] [] got AutoActivityDisplay: True
[1] [2023-07-03 12:03:32.030] [] got debug_lib: False
[1] [2023-07-03 12:03:32.030] [] got debug_prog: False
[1] [2023-07-03 12:03:32.030] [] got default_loglevel: 7
[1] [2023-07-03 12:03:32.030] [] got force_min_loglevel: 0
[1] [2023-07-03 12:03:32.030] [] got log_rotation_count: 8
[1] [2023-07-03 12:03:32.030] [] got ReverseProductOrderByUninstall: False
[1] [2023-07-03 12:03:32.030] [] got ScriptErrorMessages: False
[1] [2023-07-03 12:03:32.030] [] got supressSystemEncodingWarning: False
[1] [2023-07-03 12:03:32.030] [] got testSyntax: False
[1] [2023-07-03 12:03:32.030] [] got w10BitlockerSuspendOnReboot: False
[1] [2023-07-03 12:03:32.030] [] got writeProductLogFile: False
[1] [2023-07-03 12:03:32.030] [] Got no configs, json result was: []
[1] [2023-07-03 12:03:32.030] [] readConfigFromService: ok
[1] [2023-07-03 12:03:32.030] [] startmessage create log: 03.07.2023 12:03:32
[1] [2023-07-03 12:03:32.030] [] Cleanup old part files at 03.07.2023 12:03:32
[1] [2023-07-03 12:03:32.030] [] Backup old log files at 03.07.2023 12:03:32
[1] [2023-07-03 12:03:32.030] [] Initiate new log file at 03.07.2023 12:03:32
[1] [2023-07-03 12:03:32.030] [] force_min_loglevel: 0
[1] [2023-07-03 12:03:32.030] [] default_loglevel: 7
[1] [2023-07-03 12:03:32.030] [] debug_prog: false
[1] [2023-07-03 12:03:32.030] [] debug_lib: false
[7] [2023-07-03 12:03:32.030] [] Testing as temp path: c:\opsi.org\tmp\
[7] [2023-07-03 12:03:32.031] [] Succeeded: Testing as temp path: c:\opsi.org\tmp\ (03.07.2023 12:03:32)
[7] [2023-07-03 12:03:32.031] [] Final: Using as temp path: c:\opsi.org\tmp\
[6] [2023-07-03 12:03:32.061] [] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.061] [] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.061] [] JSON Bench for getDepotId "params":["NamePC2.Domain"],"id":1} Start: 12:03:32:031 Time: 00:00:00:030
[6] [2023-07-03 12:03:32.101] [] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.101] [] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.101] [] JSON Bench for getProductOrdering "params":["opsiserver.Domain"],"id":1} Start: 12:03:32:061 Time: 00:00:00:040
[6] [2023-07-03 12:03:32.116] [] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.116] [] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.117] [] JSON Bench for productOnClient_getObjects "params":["",{"clientId":"NamePC2.Domain" Start: 12:03:32:101 Time: 00:00:00:016
[1] [2023-07-03 12:03:32.134] [] Computername:NamePC2.Domain
[1] [2023-07-03 12:03:32.134] [] Computername according to Environment Variable :NamePC2
[1] [2023-07-03 12:03:32.134] [] opsi service URL https://opsiserver.Domain:4447
[6] [2023-07-03 12:03:32.134] [] Depot path: p:\
[6] [2023-07-03 12:03:32.134] []
[7] [2023-07-03 12:03:32.176] [] bootmode from environment: /-!!- not found -!!-/
[6] [2023-07-03 12:03:32.176] [] Bootmode: /-!!- not found -!!-/
[6] [2023-07-03 12:03:32.176] [] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [2023-07-03 12:03:32.177] [] Resolved sequence of products (03.07.2023 12:03:32):
[6] [2023-07-03 12:03:32.177] [] Product 12 seakmsp : setup
[6] [2023-07-03 12:03:32.177] [] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [2023-07-03 12:03:32.225] [] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.225] [] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.225] [] JSON Bench for getProduct_hash "params":["seakmsp","opsiserver.Domain"],"id": Start: 12:03:32:177 Time: 00:00:00:048
[7] [2023-07-03 12:03:32.225] [] in TOpsi4Data.initProduct : seakmsp
[6] [2023-07-03 12:03:32.236] [] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.236] [] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.236] [] JSON Bench for productOnClient_getObjects "params":["",{"clientId":"NamePC2.Domain" Start: 12:03:32:225 Time: 00:00:00:011
[6] [2023-07-03 12:03:32.236] [] Actionrequest for product: seakmsp is (original/actual): (setup / setup)
[6] [2023-07-03 12:03:32.259] [seakmsp] Actionrequest for Product: seakmsp is: setup
[6] [2023-07-03 12:03:32.316] [seakmsp] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.316] [seakmsp] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.316] [seakmsp] JSON Bench for getProductProperties_hash "params":["seakmsp","NamePC2.Domain"],"id Start: 12:03:32:259 Time: 00:00:00:057
[6] [2023-07-03 12:03:32.362] [seakmsp] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.362] [seakmsp] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.362] [seakmsp] JSON Bench for getProduct_hash "params":["seakmsp","opsiserver.Domain"],"id": Start: 12:03:32:316 Time: 00:00:00:046
[7] [2023-07-03 12:03:32.363] [seakmsp] in TOpsi4Data.initProduct : seakmsp
[6] [2023-07-03 12:03:32.374] [seakmsp] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.374] [seakmsp] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.375] [seakmsp] JSON Bench for productOnClient_getObjects "params":["",{"clientId":"NamePC2.Domain" Start: 12:03:32:363 Time: 00:00:00:012
[6] [2023-07-03 12:03:32.375] [seakmsp] scriptname: "setup.opsiscript", special path: "p:\seakmsp\"
[6] [2023-07-03 12:03:32.389] [seakmsp] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.389] [seakmsp] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.389] [seakmsp] JSON Bench for productOnClient_updateObject "params":[{"clientId":"NamePC2.Domain","a Start: 12:03:32:375 Time: 00:00:00:014
[6] [2023-07-03 12:03:32.389] [seakmsp] Using new Depot path: p:\
[7] [2023-07-03 12:03:32.397] [seakmsp] Load from Unicode file
[1] [2023-07-03 12:03:32.399] [seakmsp]
[1] [2023-07-03 12:03:32.399] [seakmsp] ============ Version 4.12.9.1 script "p:\seakmsp\setup.opsiscript"
[1] [2023-07-03 12:03:32.399] [seakmsp] used script encoding: utf8
[1] [2023-07-03 12:03:32.399] [seakmsp] used system encoding: cp1252
[1] [2023-07-03 12:03:32.399] [seakmsp] start: 2023-07-03 12:03:32
[1] [2023-07-03 12:03:32.399] [seakmsp] installing product: seakmsp_1.0.0-1
[1] [2023-07-03 12:03:32.399] [seakmsp] on client named "NamePC2.Domain"
[1] [2023-07-03 12:03:32.402] [seakmsp] loggedin user "m.glasser"
[1] [2023-07-03 12:03:32.402] [seakmsp] opsi-script running as "SYSTEM"
[1] [2023-07-03 12:03:32.402] [seakmsp] opsi-script running with admin privileges
[1] [2023-07-03 12:03:32.402] [seakmsp] opsi-script running in standard script mode
[1] [2023-07-03 12:03:32.402] [seakmsp] Scaling for screen DPI: 96
[1] [2023-07-03 12:03:32.402] [seakmsp] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-script\opsi-script.exe"
[1] [2023-07-03 12:03:32.402] [seakmsp] system infos:
[1] [2023-07-03 12:03:32.404] [seakmsp] 74-4C-A1-D1-CE-85 - PC hardware address
[1] [2023-07-03 12:03:32.404] [seakmsp] NamePC2.Domain - IP name
[1] [2023-07-03 12:03:32.404] [seakmsp] ***IP.1 - IP address
[1] [2023-07-03 12:03:32.404] [seakmsp] DEU - System default locale
[7] [2023-07-03 12:03:32.404] [seakmsp] Registry started without redirection (64 Bit)
[7] [2023-07-03 12:03:32.404] [seakmsp] Registry started readonly
[7] [2023-07-03 12:03:32.404] [seakmsp] Registry started without redirection (64 Bit)
[6] [2023-07-03 12:03:32.404] [seakmsp] Registry key [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion] opened
[6] [2023-07-03 12:03:32.404] [seakmsp] Key closed
[7] [2023-07-03 12:03:32.404] [seakmsp] Registry started without redirection (64 Bit)
[7] [2023-07-03 12:03:32.404] [seakmsp] Registry started readonly
[7] [2023-07-03 12:03:32.404] [seakmsp] Registry started without redirection (64 Bit)
[6] [2023-07-03 12:03:32.404] [seakmsp] Registry key [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion] opened
[6] [2023-07-03 12:03:32.404] [seakmsp] Key closed
[1] [2023-07-03 12:03:32.404] [seakmsp] MS Windows 10.0 64 Bit, Release: 22H2, Edition: PRODUCT_PROFESSIONAL
[1] [2023-07-03 12:03:32.404] [seakmsp] opsi service version : 4
[1] [2023-07-03 12:03:32.404] [seakmsp]
[7] [2023-07-03 12:03:32.405] [seakmsp] Registry started readonly
[7] [2023-07-03 12:03:32.405] [seakmsp] Registry started without redirection (64 Bit)
[6] [2023-07-03 12:03:32.405] [seakmsp] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [2023-07-03 12:03:32.405] [seakmsp] Key closed
[6] [2023-07-03 12:03:32.407] [seakmsp] Try getting FQDN with WMI:
[6] [2023-07-03 12:03:32.433] [seakmsp] WMI result for FQDN: NamePC2.Domain
[7] [2023-07-03 12:03:32.434] [seakmsp] Starting with script...
[6] [2023-07-03 12:03:32.434] [seakmsp] opsi-script has version 4.12.9.1, required is : >= 4.12.4.23
[7] [2023-07-03 12:03:32.434] [seakmsp] Found ImportLib statement for file: uib_exitcode.opsiscript and function:
[7] [2023-07-03 12:03:32.439] [seakmsp] Load from file with encoding: system
[7] [2023-07-03 12:03:32.439] [seakmsp] Load from file with encoding: utf8
[5] [2023-07-03 12:03:32.459] [seakmsp] Imported all functions from file: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-script\lib\uib_exitcode.opsiscript
[6] [2023-07-03 12:03:32.466] [seakmsp] Added defined function: ismsiexitcodefatal to the known functions
[6] [2023-07-03 12:03:32.467] [seakmsp] Added defined function: ismsiexitcodefatal_short to the known functions
[6] [2023-07-03 12:03:32.467] [seakmsp] Added defined function: ismsexitcodefatal_short to the known functions
[6] [2023-07-03 12:03:32.469] [seakmsp] Added defined function: isadvancedmsiexitcodefatal to the known functions
[6] [2023-07-03 12:03:32.470] [seakmsp] Added defined function: isinnoexitcodefatal to the known functions
[6] [2023-07-03 12:03:32.472] [seakmsp] Added defined function: isinstallshieldexitcodefatal to the known functions
[6] [2023-07-03 12:03:32.473] [seakmsp] Added defined function: isnsisexitcodefatal to the known functions
[6] [2023-07-03 12:03:32.474] [seakmsp] Added defined function: isgenericexitcodefatal to the known functions
[6] [2023-07-03 12:03:32.475] [seakmsp] Added defined function: booltogenericexitcode to the known functions
[7] [2023-07-03 12:03:32.475] [seakmsp] Found ImportLib statement for file: osd-lib.opsiscript and function:
[7] [2023-07-03 12:03:32.480] [seakmsp] Load from file with encoding: system
[7] [2023-07-03 12:03:32.483] [seakmsp] Load from file with encoding: utf8
[5] [2023-07-03 12:03:32.491] [seakmsp] Imported all functions from file: p:\seakmsp\osd-lib.opsiscript
[6] [2023-07-03 12:03:32.493] [seakmsp] Added defined function: getguidlistbydisplaynameregex to the known functions
[6] [2023-07-03 12:03:32.494] [seakmsp] Added defined function: checkformsiproduct to the known functions
[6] [2023-07-03 12:03:32.495] [seakmsp] Added defined function: get_licensekey_bypoolorkey to the known functions
[6] [2023-07-03 12:03:32.496] [seakmsp] Added defined function: get_licensekey_bypool to the known functions
[6] [2023-07-03 12:03:32.498] [seakmsp] Added defined function: desktopicon_create to the known functions
[6] [2023-07-03 12:03:32.499] [seakmsp] Added defined function: desktopicon_remove to the known functions
[1] [2023-07-03 12:03:32.499] [seakmsp] ___________________
[1] [2023-07-03 12:03:32.499] [seakmsp] script finished: success
[1] [2023-07-03 12:03:32.499] [seakmsp] 0 errors
[1] [2023-07-03 12:03:32.499] [seakmsp] 0 warnings
[1] [2023-07-03 12:03:32.499] [seakmsp] Exitcode will be: 0
[1] [2023-07-03 12:03:32.499] [seakmsp]
[1] [2023-07-03 12:03:32.499] [seakmsp] handled product: seakmsp Version: 1.0.0-1
[1] [2023-07-03 12:03:32.499] [seakmsp]
[6] [2023-07-03 12:03:32.658] [seakmsp] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.658] [seakmsp] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.658] [seakmsp] JSON Bench for setProductActionRequest "params":["seakmsp","NamePC2.Domain","upd Start: 12:03:32:499 Time: 00:00:00:159
[1] [2023-07-03 12:03:32.658] [seakmsp] product seakmsp set to update
[1] [2023-07-03 12:03:32.659] [seakmsp] Update script name:
[1] [2023-07-03 12:03:32.659] [seakmsp] we have no update script
[7] [2023-07-03 12:03:32.659] [seakmsp] BuildPC: update switches .....
[6] [2023-07-03 12:03:32.672] [seakmsp] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.672] [seakmsp] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.673] [seakmsp] JSON Bench for productOnClient_updateObject "params":[{"clientId":"NamePC2.Domain","a Start: 12:03:32:659 Time: 00:00:00:014
[7] [2023-07-03 12:03:32.673] [] Registry started with redirection (32 Bit)
[6] [2023-07-03 12:03:32.673] [] Registry key [HKLM\SOFTWARE\opsi.org\winst] opened
[6] [2023-07-03 12:03:32.673] [] Variable "RebootRequested" is keeping its value "0"
[6] [2023-07-03 12:03:32.673] [] Variable "LastLogFilename" is keeping its value "c:\opsi.org\log\opsi-script.log"
[6] [2023-07-03 12:03:32.673] [] Variable "ContinueLogFile" is keeping its value "0"
[6] [2023-07-03 12:03:32.673] [] Variable "NumberOfErrors" is keeping its value "0"
[6] [2023-07-03 12:03:32.674] [] Key flushed
[6] [2023-07-03 12:03:32.674] [] Key closed
[6] [2023-07-03 12:03:32.690] [] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.690] [] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.690] [] JSON Bench for backend_getSystemConfiguration "params":[],"id":1} Start: 12:03:32:678 Time: 00:00:00:012
[6] [2023-07-03 12:03:32.690] [] Checking if partlog: is bigger than 4 MB :.
[6] [2023-07-03 12:03:32.690] [] Checking if partlog: c:\opsi.org\log\\opsi-script-part-Fd44y0Zv9A.log is bigger than 4 MB - found: 0 MB
[5] [2023-07-03 12:03:32.690] [] -------- submitted part of log file ends here, see the rest of log file on client ----------
[6] [2023-07-03 12:03:32.693] [] read file created
[6] [2023-07-03 12:03:32.693] [] read file opend
[6] [2023-07-03 12:03:32.693] [] start reading read file ...
[6] [2023-07-03 12:03:32.695] [] write line: >", "NamePC2.Domain", false], "id": 1}< to service...
[6] [2023-07-03 12:03:32.695] [] start sending read file ...
[7] [2023-07-03 12:03:32.712] [] No Content-Encoding header. Guess identity
[6] [2023-07-03 12:03:32.731] [] HTTPSender Post succeeded
[6] [2023-07-03 12:03:32.731] [] Server-FQDN: opsiserver.Domain Server-IP: Sever*IP*
[6] [2023-07-03 12:03:32.731] [] JSON Bench for backend_exit "params":[],"id":1} Start: 12:03:32:712 Time: 00:00:00:019
[1] [2023-07-03 12:03:32.731] [] ============ opsi-script Version 4.12.9.1 is regularly exiting. Time 2023-07-03 12:03:32 Exitcode: 0 .
thomas.besser
Beiträge: 461
Registriert: 09 Sep 2009, 09:40

Re: Verknüpfungen verteilen

Beitrag von thomas.besser »

Das kann nicht das Skript sein!

Es gibt darin _keinen_ Aufruf von "LinkFolder_Setup"
thomas.besser
Beiträge: 461
Registriert: 09 Sep 2009, 09:40

Re: Verknüpfungen verteilen

Beitrag von thomas.besser »

thomas.besser hat geschrieben: 03 Jul 2023, 07:46
maxi_ybl hat geschrieben: 30 Jun 2023, 14:32 Zunächst habe ich es ganz Simple versucht :

Code: Alles auswählen

[Actions] 
requiredWinstVersion >= "4.10.8.6"
LinkFolder_Setup

;----------------------
[LinkFolder_Setup]
set_basefolder common_desktopdirectory
set_subfolder "seakmsp"

set_link
  name: "seakmsp" 
  target: "https://seak.l-t.de/msp/login.aspx"
  parameters:
  working_dir:
  icon_file:
  icon_index:
end_link
Aber ohne Erfolg (keine Aktion gesetzt) Für mein Verständnis war die Aktion Überprüfe Version und dann führe Linkfolder_Setup aus, wodurch auf dem Desktop bei allen Nutzern eine Verknüpfung zu der Website seak.l-t.de erstellt wird.
Dann poste doch bitte mal das Logfile dieses ^^^ "simplen" Skriptes.
Wenn ich ^^^ bei mir in ein Paket 'test_linkfolder' baue, dann bekomme ich dieses Logfile (Auszug davon):

Code: Alles auswählen

(134)     [5] [2023-07-03 12:30:30.131] [test_linkfolder] Execution of: LinkFolder_Setup
(135)     [6] [2023-07-03 12:30:30.132] [test_linkfolder]   Base folder is the COMMON DESKTOPDIRECTORY folder
(136)     [6] [2023-07-03 12:30:30.147] [test_linkfolder]   Created "seakmsp" in the COMMON DESKTOPDIRECTORY folder
(137)     [6] [2023-07-03 12:30:30.167] [test_linkfolder]     ShellLink "seakmsp" created
Kann es sein, dass du die ganze Zeit die Skripte in deiner Workbench änderst und vergisst, das als Paket zu bauen (opsi-makepackage) und auf dem Server zu installieren (opsi-package-manager -i <paketname>.opsi)???
maxi_ybl
Beiträge: 15
Registriert: 29 Dez 2022, 14:34

Re: Verknüpfungen verteilen

Beitrag von maxi_ybl »

Also wenn ich es richtig verstehe ist das Script an sich okay ?

Code: Alles auswählen

[Actions] 

encoding = "UTF-8" 
SetlogLevel = 7 
requiredOpsiscriptVersion >= "4.12.4.23"

importlib "uib_exitcode.opsiscript"
importlib "osd-lib.opsiscript"

LinkFolder_Test

;----------------------
[LinkFolder_Test]
set_basefolder common_desktopdirectory
set_subfolder ""
set_link
  name: "seakmsp"
  target: "https://seak.l-t.de/msp/login.aspx"
  parameters:"https://seak.l-t.de/msp/login.aspx"
  working_dir:
  icon_file:
  icon_index:
end_link
1. Also ich hab es nur mal versucht mit einem sauberen durchlauf über die Konsole vom Server deinstalliert.
2. File aus der Workbench entfernt
3. Mit dem Setup Detector ein Windows Template mit dem Namen "seakmsp" erstellt
4. Das Setup Skript in der Workbench unter Client Data geöffnet.
5. Das Template gelöscht und das Oben genannte Skript eingefügt und gespeichert.
6. Package Builder geöffnet -> Paket öffnen -> gepackt und installiert auf Konfig Server
7. Config Editor aktualisiert und neuen Job auf Setup gesetzt.

Und es funktioniert

Danke Danke Danke. Keine Ahnung wie ich auf die Idee kam das ich das in der Setup Datei bearbeite und es funktioniert ohne es neu zu initialisieren. :D Das hat viele nerven gekostet ^^
Antworten