Registry: DeleteKey Problem mit Umlauten

Antworten
Earl
Beiträge: 15
Registriert: 27 Mär 2018, 15:00

Registry: DeleteKey Problem mit Umlauten

Beitrag von Earl »

Hallo
Ich habe ein kleines Testscript mittels winst32 .exe, welches einfach einen Registryschlüssel samt Unterelemente löschen soll.
Dieser enthält aber einen Umlaut und wird nicht von OPSI gefunden.

Ich habe auch schon mit dem encoding Befehl herumgespielt und das Encoding der Skriptdatei an sich geändert, aber es heisst immer der Schlüssel wird nicht gefunden.

Code: Alles auswählen

[Actions]
Registry_Local_Clean_Findphone /SysNative

[Registry_Local_Clean_Findphone]
DeleteKey [HKEY_CURRENT_USER\Software\Häger+Busch]
Die Logdatei Ausgabe ist:

Code: Alles auswählen

[1] [Mrz 27 15:10:47:549] --
[1] [Mrz 27 15:10:47:550] --
[1] [Mrz 27 15:10:47:550] c:\opsi.org\log\opsi-script-part-Nh43Sk34.log
[1] [Mrz 27 15:10:47:551] opsi-script 4.12.0.7 started at 27.03.2018 09:50:22
[1] [Mrz 27 15:10:47:552] opsi-script log file with encoding utf8
[6] [Mrz 27 15:10:47:552] Using old Depot path:  p:\
[1] [Mrz 27 15:10:47:554] 
[1] [Mrz 27 15:10:47:555] ============ Version 4.12.0.7 script "C:\package-workbench\test2.opsiscript"
[1] [Mrz 27 15:10:47:555]              used script encoding: cp1252
[1] [Mrz 27 15:10:47:556]              used system encoding: cp1252
[1] [Mrz 27 15:10:47:556]              start: 2018-03-27  15:10:47 
[1] [Mrz 27 15:10:47:557]              on client named    "FV"
[1] [Mrz 27 15:10:47:558]              loggedin user    "Administrator"
[1] [Mrz 27 15:10:47:558]              opsi-script running as    "Administrator"
[1] [Mrz 27 15:10:47:559]              opsi-script running with admin privileges
[1] [Mrz 27 15:10:47:560]              opsi-script running in standard script mode
[1] [Mrz 27 15:10:47:560] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Mrz 27 15:10:47:561] system infos:
[1] [Mrz 27 15:10:47:562] 08-00-27-38-B0-55  -  PC hardware address
[1] [Mrz 27 15:10:47:563] FV  -  IP name 
[1] [Mrz 27 15:10:47:564] 10.0.2.31  -  IP address
[1] [Mrz 27 15:10:47:565] DEU  -  System default locale 
[1] [Mrz 27 15:10:47:565] MS Windows 6.1 64 Bit, Edition: Enterprise Edition
[1] [Mrz 27 15:10:47:566] 
[6] [Mrz 27 15:10:47:567] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [Mrz 27 15:10:47:569] Key closed
[5] [Mrz 27 15:10:47:607] Execution of: Registry_Local_Clean_Findphone /SysNative
[5] [Mrz 27 15:10:47:609] 
[6] [Mrz 27 15:10:47:611]     Info: Registry key [HKEY_CURRENT_USER\Software\Häger+Busch]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[6] [Mrz 27 15:10:47:612]     Registry key [HKEY_CURRENT_USER\]  opened
[6] [Mrz 27 15:10:47:614]     Info: key "Software\Häger+Busch" not found 
[6] [Mrz 27 15:10:47:615]     Key closed
[1] [Mrz 27 15:10:47:620] ___________________
[1] [Mrz 27 15:10:47:621] script finished: success
[1] [Mrz 27 15:10:47:622] 0 errors
[1] [Mrz 27 15:10:47:624] 0 warnings
[1] [Mrz 27 15:10:47:625] 
[1] [Mrz 27 15:10:47:626] 
bernd670
Beiträge: 90
Registriert: 16 Mär 2018, 10:44

Re: Registry: DeleteKey Problem mit Umlauten

Beitrag von bernd670 »

Hallo,

ich habe das ganze mal nachgestellt!

Wenn ich das Script

Code: Alles auswählen

[Actions]
requiredWinstVersion >= "4.11.4.2"
encoding=UTF-8

Registry_Local_Clean_Findphone /SysNative /AllNtUserDats

[Registry_Local_Clean_Findphone]
deleteKey [HKCU\Software\Häger+Busch]

in UTF-8 speichere, dann werden die Umlaute richtig erkannt.
Allerdings wird der Schlüssel denoch nicht gelöscht.

Code: Alles auswählen

[1] [Jun 10 12:41:46:892] [test] ============ Version 4.12.0.21 script "p:\test\setup.ins"
[1] [Jun 10 12:41:46:892] [test]              used script encoding: UTF-8
[1] [Jun 10 12:41:46:892] [test]              used system encoding: cp1252
[1] [Jun 10 12:41:46:892] [test]              start: 2018-06-10  12:41:46
[1] [Jun 10 12:41:46:892] [test]              installing product: test_1.0.0.0-1
[1] [Jun 10 12:41:46:892] [test]              on client named    "test-pc"
[1] [Jun 10 12:41:46:892] [test]              loggedin user    ""
[1] [Jun 10 12:41:46:895] [test]              opsi-script running as    "SYSTEM"
[1] [Jun 10 12:41:46:895] [test]              opsi-script running with admin privileges
[1] [Jun 10 12:41:46:895] [test]              opsi-script running in standard script mode
[1] [Jun 10 12:41:46:895] [test] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Jun 10 12:41:46:895] [test] system infos:
[1] [Jun 10 12:41:46:922] [test] 08-00-27-E5-C3-75  -  PC hardware address
[1] [Jun 10 12:41:46:922] [test] test-pc  -  IP name
[1] [Jun 10 12:41:46:922] [test] 172.16.1.3  -  IP address
[1] [Jun 10 12:41:46:922] [test] DEU  -  System default locale
[1] [Jun 10 12:41:46:922] [test] MS Windows 6.1 64 Bit, Edition: PRODUCT_PROFESSIONAL
[1] [Jun 10 12:41:46:922] [test] opsi service version : 4
[1] [Jun 10 12:41:46:922] [test]
[7] [Jun 10 12:41:46:925] [test] Registry started readonly
[7] [Jun 10 12:41:46:925] [test] Registry started without redirection (64 Bit)
[6] [Jun 10 12:41:46:925] [test] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [Jun 10 12:41:46:925] [test] Key closed
[6] [Jun 10 12:41:47:087] [test] opsi-script has version  4.12.0.21, required is : >= 4.11.4.2
[5] [Jun 10 12:41:47:087] [test] Execution of: Registry_Local_Clean_Findphone /SysNative /AllNtUserDats
[5] [Jun 10 12:41:47:087] [test]
[7] [Jun 10 12:41:47:087] [test]   Registry started without redirection (64 Bit)
[7] [Jun 10 12:41:47:089] [test]   Registry started readonly
[7] [Jun 10 12:41:47:089] [test]   Registry started without redirection (64 Bit)
[6] [Jun 10 12:41:47:089] [test]   Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-1844586229-675080182-1439993028-1103]  opened
[6] [Jun 10 12:41:47:089] [test]   Key closed
[6] [Jun 10 12:41:47:089] [test]
[6] [Jun 10 12:41:47:089] [test]   Branch: testuser
[6] [Jun 10 12:41:47:540] [test]   "C:\Users\testuser\NTUser.dat" loaded.
[5] [Jun 10 12:41:47:540] [test]
[7] [Jun 10 12:41:47:540] [test]       Registry started without redirection (64 Bit)
[6] [Jun 10 12:41:47:540] [test]         Registry key [HKEY_USERS\PatchNTUserdatTempUser\Software\Häger+Busch]  opened
[6] [Jun 10 12:41:47:540] [test]         Key closed
[6] [Jun 10 12:41:47:540] [test]         Registry key [HKEY_USERS\]  opened
[6] [Jun 10 12:41:47:541] [test]         Info: key "PatchNTUserdatTempUser\Software\Häger+Busch" not found
[6] [Jun 10 12:41:47:541] [test]         Key closed
[7] [Jun 10 12:41:47:545] [test]
[7] [Jun 10 12:41:48:115] [test]   Flushed
[7] [Jun 10 12:41:48:122] [test]   Unloaded
[1] [Jun 10 12:41:48:885] [test] ___________________
[1] [Jun 10 12:41:48:885] [test] script finished: success
[1] [Jun 10 12:41:48:885] [test] 0 errors
[1] [Jun 10 12:41:48:885] [test] 0 warnings
Gruß
Bernd
MfG
Bernd
Antworten