[BUG] Supp funktioniert nicht richtig

jey
Beiträge: 4
Registriert: 21 Okt 2013, 10:03

Re: [BUG] Supp funktioniert nicht richtig

Beitrag von jey »

Hallo,
ich möchte hier gerne auch noch etwas beitragen. Ich habe das Problem bei mir ebenfalls feststellen können. Ich habe hier seit Jahren ein Skript für die Java-Verteilung laufen, bislang ohne Probleme. Als ich letzte Woche damit die neue Java-Version verteilt habe, hat mir das Skript auf allen Clients die Path-Variable zerschossen. :shock:
Vor einigen Wochen hatte ich die Winst-Version auf den Clients aktualisiert, zzt. läuft dort die 4.11.6.8. Clients sind Windows 7-64. Standardmäßig wird nur Java-32 ausgerollt.

Das Skript hat einen Programmierfehler, wie ich nun feststellen konnte. Es wird 2x versucht, den Java-Pfad zur Path-Variable zuzufügen. :roll:

Code: Alles auswählen

if (($PP_Architecture$ = "both") or ($PP_Architecture$ = "32 only"))
	Message "Installing Java 8 32Bit"
	Sub_Install8-32
	Registry_AddInstDirToPath-32
endif
if (($PP_Architecture$ = "both") or ($PP_Architecture$ = "64 only"))
	Message "Installing Java 8 64Bit"
	Sub_Install8-64
	Registry_AddInstDirToPath-64
endif
if ($PP_Architecture$ = "32 only")
	Registry_AddInstDirToPath-32
endif
if ($PP_Architecture$ = "64 only")
	Registry_AddInstDirToPath-64
endif
if ($PP_Architecture$ = "both")
	Registry_AddInstDirToPath-3264
endif
[...]
[Registry_AddInstDirToPath-32]
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment]
supp "Path"; "$InstallDir32$\bin"

[Registry_AddInstDirToPath-64]
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment]
supp "Path"; "$InstallDir64$\bin"
Bislang tat das nicht weh, seit dem Update des Winst schon:
(6747) [5] [Jan 20 07:51:39:944] [mvr-javavm] Execution of Registry_AddInstDirToPath-32
(6748) [7] [Jan 20 07:51:39:944] [mvr-javavm] Registry started with redirection (32 Bit)
(6749) [7] [Jan 20 07:51:39:944] [mvr-javavm] Key is: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment
(6750) [7] [Jan 20 07:51:39:944] [mvr-javavm] Key0 is: HKEY_LOCAL_MACHINE
(6751) [8] [Jan 20 07:51:39:944] [mvr-javavm] key0 : HKEY_LOCAL_MACHINE is a valid base key and we will use it
(6752) [8] [Jan 20 07:51:39:944] [mvr-javavm] We will open Key : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment
(6753) [6] [Jan 20 07:51:39:944] [mvr-javavm] Registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment] opened
(6754) [9] [Jan 20 07:51:39:945] [mvr-javavm] Found Name: Path (encoded: Path) bytes:406
(6755) [9] [Jan 20 07:51:39:945] [mvr-javavm] successful querying for Value from Name: Path (encoded: Path) bytes:406
(6756) [9] [Jan 20 07:51:39:945] [mvr-javavm] Found Value: (encoded: C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\PlantConnect.BIN\System;C:\PGIM\PlantConnect.BIN\Signalexplorer;C:\PGIM\PlantConnect.BIN\Events\Client;C:\Program Files (x86)\Enterprise Vault\EVClient\\u0000v) bytes:406
(6757) [9] [Jan 20 07:51:39:945] [mvr-javavm] Found Value: (encoded: C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\PlantConnect.BIN\System;C:\PGIM\PlantConnect.BIN\Signalexplorer;C:\PGIM\PlantConnect.BIN\Events\Client;C:\Program Files (x86)\Enterprise Vault\EVClient\u0000\u0000v)
(6758) [9] [Jan 20 07:51:39:945] [mvr-javavm] Found Value: >C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\Pl< (encoded: C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\PlantConnect.BIN\System;C:\PGIM\PlantConnect.BIN\Signalexplorer;C:\PGIM\PlantConnect.BIN\Events\Client;C:\Program Files (x86)\Enterprise Vault\EVClient\\u0000v)
(6759) [6] [Jan 20 07:51:39:945] [mvr-javavm] Variable "Path" supplemented with "C:\Program Files (x86)\Java\jre8\bin"
(6760) [6] [Jan 20 07:51:39:945] [mvr-javavm] Key closed
[...]
(6784) [5] [Jan 20 07:51:39:948] [mvr-javavm] Execution of Registry_AddInstDirToPath-32
(6785) [7] [Jan 20 07:51:39:948] [mvr-javavm] Registry started with redirection (32 Bit)
(6786) [7] [Jan 20 07:51:39:948] [mvr-javavm] Key is: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment
(6787) [7] [Jan 20 07:51:39:948] [mvr-javavm] Key0 is: HKEY_LOCAL_MACHINE
(6788) [8] [Jan 20 07:51:39:948] [mvr-javavm] key0 : HKEY_LOCAL_MACHINE is a valid base key and we will use it
(6789) [8] [Jan 20 07:51:39:948] [mvr-javavm] We will open Key : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment
(6790) [6] [Jan 20 07:51:39:948] [mvr-javavm] Registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment] opened
(6791) [9] [Jan 20 07:51:39:948] [mvr-javavm] Found Name: Path (encoded: Path) bytes:293
(6792) [9] [Jan 20 07:51:39:948] [mvr-javavm] successful querying for Value from Name: Path (encoded: Path) bytes:293
(6793) [9] [Jan 20 07:51:39:948] [mvr-javavm] Found Value: (encoded: C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\Pl;C:\Program Files (x86)\Java\jre8\bin\u00008) bytes:293
(6794) [9] [Jan 20 07:51:39:948] [mvr-javavm] Found Value: (encoded: C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\Pl;C:\Program Files (x86)\Java\jre8\bi\u0000\u00008)
(6795) [9] [Jan 20 07:51:39:948] [mvr-javavm] Found Value: >C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\Pl< (encoded: C:\Program Files\CyberSafe\bin;C:\Program Files (x86)\CyberSafe\bin;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Gupta Framework;C:\PGIM\Pl;C:\Program Files (x86)\Java\jre8\bin\u00008)
(6796) [6] [Jan 20 07:51:39:948] [mvr-javavm] Variable "Path" supplemented with "C:\Program Files (x86)\Java\jre8\bin"
(6797) [6] [Jan 20 07:51:39:948] [mvr-javavm] Key closed
Für mich ein Bug, da sich das Verhalten geändert hat und nun offenbar nicht mehr als einmal ein Supp durchgeführt werden darf vor dem Reboot. Die im Path oben enthaltenen Strings "\u0000v", "\u0000\u00008" und ähnliches sind übrigens im Path nicht enthalten und könnten zur Lösung führen.

Wenn übrigens jemand eine Idee hat, wie ich bei ein paar Dutzend Rechnern wieder den (jeweils unterschiedlichen) richtigen Stand der Path-Variable herstellen kann, bin ich wirklich dankbar... :?
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: [BUG] Supp funktioniert nicht richtig

Beitrag von d.oertel »

Hi,

ich kann das Problem mit den angegebenen Strings hier nicht nachvollziehen.

Bitte mal den den folgende Version ausprobieren:
http://download.uib.de/opsi4.0/testing/ ... .11-1.opsi

Wenn das nicht hilft (was durchaus sein kann wegen der vermeintlich nicht vorhandenen hängenden Zeichen)
bitte einen Export des 32 Bit Registryzweigs HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment erzeugen und mir (d.oertel(at)uib.de) zusenden.

Dann kann ich mir das näher anschauen.
Insbesondere warum hier der Path bei "C:\PGIM\Pl" abgeschnitten wird.

Das was sich in den letzten Versionen hier geändert hat, ist ein Umstieg von ANSI auf UFT8/Unicode.

gruß
d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
jey
Beiträge: 4
Registriert: 21 Okt 2013, 10:03

Re: [BUG] Supp funktioniert nicht richtig

Beitrag von jey »

Hallo,
mit der 4.11.6.11 kann ich den Fehler nicht mehr nachstellen.
Nun die spannende Frage: wurde an dem Code dazu etwas geändert, oder ist das ein extrem schmutziger Bug?

Jens
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: [BUG] Supp funktioniert nicht richtig

Beitrag von SisterOfMercy »

Is the other supp thing also fixed?

path before supp:

Code: Alles auswählen

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
path after supp:
path before supp:

Code: Alles auswählen

c:\windows\system32;c:\windows;c:\windows\System32\Wbem
Or is that working like it should?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: [BUG] Supp funktioniert nicht richtig

Beitrag von d.oertel »

Hallo,

@jey:
Da hat sich tatsächlich etwas geändert: Der ganze Registry Bereich wird derzeit von ANSI Sting auf Unicode umgestellt.
Das ist jetzt weitgehend fertig. Aber ein paar Änderungen kommen da noch.
Hintergrund ist, das opsi-script seit 4.11.6 intern mit UFT8 arbeitet.

@SisterOfMercy:
%systemroot% is a opsi-script constant. So if you want to write it to the registry you have to mask it:
DefVar $regmask$
set $regmask$ = '%'+'systemroot+'%'

[registry_test]
openkey [HKLM/software/anything]
set PATH='$regmask$\dir1/dir2'

gruß
d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
Antworten