opsi-script "Execute viewlist as script" wird von log output beeinflusst

Antworten
lukas.e
Beiträge: 14
Registriert: 18 Sep 2019, 14:29

opsi-script "Execute viewlist as script" wird von log output beeinflusst

Beitrag von lukas.e »

opsi-script scheint die viewlist dann direkt als Skript zu verwenden, wenn man das "Execute viewlist as script"-Feature verwendet. Wenn man bestimmte Sektionstypen verwendet, geht es allerdings deswegen kaputt, zum Beispiel mit diesem Skript in der viewlist:

Code: Alles auswählen

[Actions]

WinBatch_test

[WinBatch_test]
"C:\windows\system32\cmd.exe" /c "echo test"
Dann zählt opsi-script offensichtlich die Log-Nachrichten von sich selbst zur WinBatch-Sektion und versucht sie auszuführen:

Code: Alles auswählen

[Actions]

WinBatch_test

[WinBatch_test]
"C:\windows\system32\cmd.exe" /c "echo test"
[1] [Jan 08 11:52:52:250] --
[1] [Jan 08 11:52:52:252] --
[1] [Jan 08 11:52:52:253] C:\Users\Lukas\AppData\Local\Temp\opsi-script-part-Hs97Zn28.log
[1] [Jan 08 11:52:52:256] opsi-script 4.12.1.5 started at >>
[1] [Jan 08 11:52:52:258] opsi-script log file with encoding utf8
[1] [Jan 08 11:52:52:259] startmessage opsi-script created at CentralForm.FormCreate: 08.01.2020 11:52:43
[1] [Jan 08 11:52:52:261] Loading skin from: P:\opsi-winst-stable\files\opsi-winst\winstskin
[1] [Jan 08 11:52:52:263] startmessage StartProgramModes and create log: 08.01.2020 11:52:43
[1] [Jan 08 11:52:52:265] pm: 2 08.01.2020 11:52:43
[3] [Jan 08 11:52:52:269] readconfig failed: Perhaps got defaults
[6] [Jan 08 11:52:52:271] Depot path from readconfig:  p:\
[6] [Jan 08 11:52:52:275] Restoring depot path from backup
[1] [Jan 08 11:52:52:278] Prog: force_min_loglevel: 4
[1] [Jan 08 11:52:52:281] Prog: default_loglevel: 7
[1] [Jan 08 11:52:52:284] Prog: debug_prog: False
[1] [Jan 08 11:52:52:287] Prog: debug_lib: True
[1] [Jan 08 11:52:52:290] Prog: ScriptErrorMessages: False
[1] [Jan 08 11:52:52:293] Prog: AutoActivityDisplay: False
[6] [Jan 08 11:52:52:295] Using new Depot path:
[1] [Jan 08 11:52:52:302] 
[1] [Jan 08 11:52:52:305] ============ Version 4.12.1.5 script ""
[1] [Jan 08 11:52:52:308]              used script encoding:
[1] [Jan 08 11:52:52:310]              used system encoding: cp1252
[1] [Jan 08 11:52:52:314]              start: 2020-01-08  11:52:52
[1] [Jan 08 11:52:52:317]              on client named    "xxx"
[1] [Jan 08 11:52:52:320]              loggedin user    "Lukas"
[1] [Jan 08 11:52:52:322]              opsi-script running as    "Lukas"
[1] [Jan 08 11:52:52:324]              opsi-script running with admin privileges
[1] [Jan 08 11:52:52:327]              opsi-script running in standard script mode
[1] [Jan 08 11:52:52:330] executing: "P:\opsi-winst-stable\files\opsi-winst\winst32.exe"
[1] [Jan 08 11:52:52:333] system infos:
[1] [Jan 08 11:52:52:345] 00-19-99-92-EF-27  -  PC hardware address
[1] [Jan 08 11:52:52:348] xxx -  IP name
[1] [Jan 08 11:52:52:350] xxx  -  IP address
[1] [Jan 08 11:52:52:354] DEU  -  System default locale
[7] [Jan 08 11:52:52:357] Registry started without redirection (64 Bit)
[1] [Jan 08 11:52:52:360] MS Windows 10.0 64 Bit, Edition: Enterprise Edition
[1] [Jan 08 11:52:52:362] 
[7] [Jan 08 11:52:52:366] Registry started readonly
[7] [Jan 08 11:52:52:369] Registry started without redirection (64 Bit)
[6] [Jan 08 11:52:52:372] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [Jan 08 11:52:52:375] Key closed
[5] [Jan 08 11:52:52:444] Execution of: WinBatch_test
[5] [Jan 08 11:52:52:448] 
[6] [Jan 08 11:52:52:450]   Call ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:52:453]      Waiting until the called process is finished
[6] [Jan 08 11:52:52:456]   Start process as invoker: Lukas
[6] [Jan 08 11:52:53:473]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:480]   Call "[1] [Jan 08 11:52:52:250] --"
[6] [Jan 08 11:52:53:487]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:495]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:517]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:250] -- : 2
[6] [Jan 08 11:52:53:523]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:530]   Call "[1] [Jan 08 11:52:52:252] --"
[6] [Jan 08 11:52:53:537]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:541]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:551]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:252] -- : 2
[6] [Jan 08 11:52:53:554]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:557]   Call "[1] [Jan 08 11:52:52:253] C:\Users\Lukas\AppData\Local\Temp\opsi-script-part-Hs97Zn28.log"
[6] [Jan 08 11:52:53:561]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:564]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:572]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:253] C:\Users\Lukas\AppData\Local\Temp\opsi-script-part-Hs97Zn28.log : 2
[6] [Jan 08 11:52:53:575]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:579]   Call "[1] [Jan 08 11:52:52:256] opsi-script 4.12.1.5 started at >>"
[6] [Jan 08 11:52:53:582]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:586]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:598]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:256] opsi-script 4.12.1.5 started at >> : 2
[6] [Jan 08 11:52:53:601]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:605]   Call "[1] [Jan 08 11:52:52:258] opsi-script log file with encoding utf8"
[6] [Jan 08 11:52:53:607]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:610]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:623]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:258] opsi-script log file with encoding utf8 : 2
[6] [Jan 08 11:52:53:627]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:630]   Call "[1] [Jan 08 11:52:52:259] startmessage opsi-script created at CentralForm.FormCreate: 08.01.2020 11:52:43"
[6] [Jan 08 11:52:53:634]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:637]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:650]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:259] startmessage opsi-script created at CentralForm.FormCreate: 08.01.2020 11:52:43 : 2
[6] [Jan 08 11:52:53:653]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:656]   Call "[1] [Jan 08 11:52:52:261] Loading skin from: P:\opsi-winst-stable\files\opsi-winst\winstskin"
[6] [Jan 08 11:52:53:659]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:663]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:675]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:261] Loading skin from: P:\opsi-winst-stable\files\opsi-winst\winstskin : 2
[6] [Jan 08 11:52:53:678]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:682]   Call "[1] [Jan 08 11:52:52:263] startmessage StartProgramModes and create log: 08.01.2020 11:52:43"
[6] [Jan 08 11:52:53:685]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:688]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:701]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:263] startmessage StartProgramModes and create log: 08.01.2020 11:52:43 : 2
[6] [Jan 08 11:52:53:705]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:708]   Call "[1] [Jan 08 11:52:52:265] pm: 2 08.01.2020 11:52:43"
[6] [Jan 08 11:52:53:711]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:714]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:725]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:265] pm: 2 08.01.2020 11:52:43 : 2
[6] [Jan 08 11:52:53:728]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:731]   Call "[3] [Jan 08 11:52:52:269] readconfig failed: Perhaps got defaults"
[6] [Jan 08 11:52:53:734]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:737]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:750]   Exception in StartProcess_cp: Failed to execute [3] [Jan 08 11:52:52:269] readconfig failed: Perhaps got defaults : 2
[6] [Jan 08 11:52:53:753]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:756]   Call "[6] [Jan 08 11:52:52:271] Depot path from readconfig:  p:\"
[6] [Jan 08 11:52:53:759]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:762]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:774]   Exception in StartProcess_cp: Failed to execute [6] [Jan 08 11:52:52:271] Depot path from readconfig:  p:\ : 2
[6] [Jan 08 11:52:53:777]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:781]   Call "[6] [Jan 08 11:52:52:275] Restoring depot path from backup"
[6] [Jan 08 11:52:53:784]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:787]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:800]   Exception in StartProcess_cp: Failed to execute [6] [Jan 08 11:52:52:275] Restoring depot path from backup : 2
[6] [Jan 08 11:52:53:804]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:807]   Call "[1] [Jan 08 11:52:52:278] Prog: force_min_loglevel: 4"
[6] [Jan 08 11:52:53:810]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:813]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:823]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:278] Prog: force_min_loglevel: 4 : 2
[6] [Jan 08 11:52:53:826]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:830]   Call "[1] [Jan 08 11:52:52:281] Prog: default_loglevel: 7"
[6] [Jan 08 11:52:53:833]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:836]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:847]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:281] Prog: default_loglevel: 7 : 2
[6] [Jan 08 11:52:53:850]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:854]   Call "[1] [Jan 08 11:52:52:284] Prog: debug_prog: False"
[6] [Jan 08 11:52:53:856]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:859]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:870]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:284] Prog: debug_prog: False : 2
[6] [Jan 08 11:52:53:873]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:876]   Call "[1] [Jan 08 11:52:52:287] Prog: debug_lib: True"
[6] [Jan 08 11:52:53:879]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:883]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:893]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:287] Prog: debug_lib: True : 2
[6] [Jan 08 11:52:53:896]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:899]   Call "[1] [Jan 08 11:52:52:290] Prog: ScriptErrorMessages: False"
[6] [Jan 08 11:52:53:902]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:905]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:916]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:290] Prog: ScriptErrorMessages: False : 2
[6] [Jan 08 11:52:53:919]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:922]   Call "[1] [Jan 08 11:52:52:293] Prog: AutoActivityDisplay: False"
[6] [Jan 08 11:52:53:925]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:928]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:938]   Exception in StartProcess_cp: Failed to execute [1] [Jan 08 11:52:52:293] Prog: AutoActivityDisplay: False : 2
[6] [Jan 08 11:52:53:941]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[6] [Jan 08 11:52:53:945]   Call "[6] [Jan 08 11:52:52:295] Using new Depot path:"
[6] [Jan 08 11:52:53:948]      Waiting until the called process is finished
[6] [Jan 08 11:52:53:951]   Start process as invoker: Lukas
[3] [Jan 08 11:52:53:962]   Exception in StartProcess_cp: Failed to execute [6] [Jan 08 11:52:52:295] Using new Depot path: : 2
[6] [Jan 08 11:52:53:966]   ExitCode 0    Executed process ""C:\windows\system32\cmd.exe" /c "echo test""
[1] [Jan 08 11:52:53:973] ___________________
[1] [Jan 08 11:52:53:976] script finished: success
[1] [Jan 08 11:52:53:978] 20 errors
[1] [Jan 08 11:52:53:981] 0 warnings
[1] [Jan 08 11:52:53:984] 
[1] [Jan 08 11:52:53:987] 
Den Log Output kann und sollte man offensichtlich nicht ausführen.
Antworten