...funktioniert so bei mir im angemeldeten Zustand nicht. Wenn ich mit einem Roaming Profile angemeldet bin und einen CU-Eintrag on_demand ändern möchte wird dies mir zwar in der Produktübersicht vom configed als erfolgreich erledigt angezeigt, in Wirklichkeit wurde aber nur der CurrentUser-Eintrag vom .DEFAULT User geändert - nicht der vom aktuell angemeldeten User.[registry_test]
openkey [HKCU\software\.....]
set key=value
Wenn ich mit folgendem Script die CurrentUser-Einträge von allen Usern anpassen möchte während ich mit dem User "psc" angemeldet bin...
Code: Alles auswählen
[Actions]
DefVar $computer$
DefVar $user$
DefVar $os$
DefVar $ntversion$
DefVar $msversion$
DefVar $ostype$
DefVar $registryuser$
set $computer$ = "%PCName%"
set $user$ ="%Username%"
set $os$ = GetOS
set $ntversion$ = GetNTVersion
set $msversion$ = GetMsVersionInfo
set $ostype$ = GetSystemType
set $registryuser$ = GetRegistryStringValue("[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]Logon User Name")
Registry_CUtest /sysNative /AllNTUserDATs
[Registry_CUtest]
openkey [Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate]
set "DisableWindowsUpdateAccess"=REG_DWORD:1
Code: Alles auswählen
[1] [16.11.2010 14:33:56] opsi-winst 4.10.8.6 started at 16.11.2010 14:33:54
[6] [16.11.2010 14:33:56] JSON service request https://10.0.0.15:4447/rpc getDepotId
[6] [16.11.2010 14:33:56] JSON service request https://10.0.0.15:4447/rpc backend_setOptions
[6] [16.11.2010 14:33:56] JSON service request https://10.0.0.15:4447/rpc productOnClient_getObjects
[1] [16.11.2010 14:33:56] action entry : opsi-client-agent=none
[1] [16.11.2010 14:33:56] state entry : opsi-client-agent=installed
[1] [16.11.2010 14:33:56] action entry : adobe_reader=none
[1] [16.11.2010 14:33:56] state entry : adobe_reader=installed
[1] [16.11.2010 14:33:56] action entry : hwaudit=none
[1] [16.11.2010 14:33:56] state entry : hwaudit=installed
[1] [16.11.2010 14:33:56] action entry : adobe_flash_player=none
[1] [16.11.2010 14:33:56] state entry : adobe_flash_player=installed
[1] [16.11.2010 14:33:56] action entry : test=always
[1] [16.11.2010 14:33:56] state entry : test=installed
[1] [16.11.2010 14:33:56] action entry : opsi-winst=none
[1] [16.11.2010 14:33:56] state entry : opsi-winst=installed
[1] [16.11.2010 14:33:56] action entry : pdfcreator=none
[1] [16.11.2010 14:33:56] state entry : pdfcreator=installed
[1] [16.11.2010 14:33:56] action entry : vlc_player=none
[1] [16.11.2010 14:33:56] state entry : vlc_player=installed
[1] [16.11.2010 14:33:56] action entry : swaudit=none
[1] [16.11.2010 14:33:56] state entry : swaudit=installed
[1] [16.11.2010 14:33:56] Product : opsi-client-agent
[1] [16.11.2010 14:33:56] Product : adobe_reader
[1] [16.11.2010 14:33:56] Product : hwaudit
[1] [16.11.2010 14:33:56] Product : adobe_flash_player
[1] [16.11.2010 14:33:56] Product : test
[1] [16.11.2010 14:33:56] Product : opsi-winst
[1] [16.11.2010 14:33:56] Product : pdfcreator
[1] [16.11.2010 14:33:56] Product : vlc_player
[1] [16.11.2010 14:33:56] Product : swaudit
[1] [16.11.2010 14:33:56] Product sequence calculated by opsi-server
[5] [16.11.2010 14:33:56] Computername:wm01-043.domain.de
[5] [16.11.2010 14:33:56] Computername according to Environment Variable :WM01-043
[5] [16.11.2010 14:33:56] opsi service URL https://10.0.0.15:4447
[5] [16.11.2010 14:33:56] Depot path: b:\install
[5] [16.11.2010 14:33:56]
[6] [16.11.2010 14:33:56] bootmode from registry: BKSTD
[5] [16.11.2010 14:33:56] bootmode BKSTD
[5] [16.11.2010 14:33:56] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[5] [16.11.2010 14:33:56] Resolved sequence of products (16.11.2010 14:33:56):
[5] [16.11.2010 14:33:56] Product 4 test : always
[5] [16.11.2010 14:33:56] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [16.11.2010 14:33:56] JSON service request https://10.0.0.15:4447/rpc getProductProperties_hash
[6] [16.11.2010 14:33:57] JSON service request https://10.0.0.15:4447/rpc getProduct_hash
[1] [16.11.2010 14:33:57] in TOpsi4Data.initProduct : test
[6] [16.11.2010 14:33:57] JSON service request https://10.0.0.15:4447/rpc productOnClient_getObjects
[5] [16.11.2010 14:33:57] scriptname: "always.ins", special path: "b:\install\test\"
[1] [16.11.2010 14:33:57]
[1] [16.11.2010 14:33:57] ============ Version 4.10.8.6 WIN32 script "b:\install\test\always.ins"
[1] [16.11.2010 14:33:57] start: 2010-11-16 14:33:57
[1] [16.11.2010 14:33:57] on client named "wm01-043.domain.de"
[1] [16.11.2010 14:33:57] user account "pcpatch"
[1] [16.11.2010 14:33:57] [executing: "C:\Programme\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"]
[1] [16.11.2010 14:33:57] system infos:
[1] [16.11.2010 14:33:57] 00:1B:21:0A:75:C0 - PC hardware address
[1] [16.11.2010 14:33:57] wm01-043 - IP name
[1] [16.11.2010 14:33:57] 10.0.1.43 - IP address
[1] [16.11.2010 14:33:57] DEU - System default locale
[1] [16.11.2010 14:33:57] opsi service version : 4
[1] [16.11.2010 14:33:57]
[6] [16.11.2010 14:33:57] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [16.11.2010 14:33:57] Key closed
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Set $computer$ = "WM01-043"
[6] [16.11.2010 14:33:57] The value of the variable "$computer$" is now: "WM01-043"
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Set $user$ ="pcpatch"
[6] [16.11.2010 14:33:57] The value of the variable "$user$" is now: "pcpatch"
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Set $os$ = GetOS
[6] [16.11.2010 14:33:57] The value of the variable "$os$" is now: "Windows_NT"
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Set $ntversion$ = GetNTVersion
[6] [16.11.2010 14:33:57] The value of the variable "$ntversion$" is now: "WinXP"
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Set $msversion$ = GetMsVersionInfo
[6] [16.11.2010 14:33:57] The value of the variable "$msversion$" is now: "5.1"
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Set $ostype$ = GetSystemType
[6] [16.11.2010 14:33:57] The value of the variable "$ostype$" is now: "x86 System"
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Set $registryuser$ = GetRegistryStringValue("[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]Logon User Name")
[6] [16.11.2010 14:33:57] Registry key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] opened
[6] [16.11.2010 14:33:57] Key closed
[6] [16.11.2010 14:33:57] The value of the variable "$registryuser$" is now: "gastws"
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Execution of Registry_CUtest
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Branch: Administrator
[6] [16.11.2010 14:33:57] "C:\Dokumente und Einstellungen\Administrator\NTUser.dat" loaded.
[5] [16.11.2010 14:33:57]
[5] [16.11.2010 14:33:57] Execution of Registry_CUtest
[6] [16.11.2010 14:33:57] Registry key [HKEY_USERS\PatchNTUserdatTempUser\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate] created
[6] [16.11.2010 14:33:57] Variable "DisableWindowsUpdateAccess" set to "1"
[6] [16.11.2010 14:33:57] Key closed
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Branch: All Users
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Branch: Default User
[6] [16.11.2010 14:33:58] "C:\Dokumente und Einstellungen\Default User\NTUser.dat" loaded.
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Execution of Registry_CUtest
[6] [16.11.2010 14:33:58] Registry key [HKEY_USERS\PatchNTUserdatTempUser\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate] created
[6] [16.11.2010 14:33:58] Variable "DisableWindowsUpdateAccess" set to "1"
[6] [16.11.2010 14:33:58] Key closed
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Branch: LocalService
[4] [16.11.2010 14:33:58] Warning: NTUser.dat could not be loaded from path "C:\Dokumente und Einstellungen\LocalService\NTUser.dat". Code 32: Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Branch: NetworkService
[4] [16.11.2010 14:33:58] Warning: NTUser.dat could not be loaded from path "C:\Dokumente und Einstellungen\NetworkService\NTUser.dat". Code 32: Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Branch: psc
[4] [16.11.2010 14:33:58] Warning: NTUser.dat could not be loaded from path "C:\Dokumente und Einstellungen\psc\NTUser.dat". Code 32: Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Branch: root
[6] [16.11.2010 14:33:58] "C:\Dokumente und Einstellungen\root\NTUser.dat" loaded.
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Execution of Registry_CUtest
[6] [16.11.2010 14:33:58] Registry key [HKEY_USERS\PatchNTUserdatTempUser\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate] created
[6] [16.11.2010 14:33:58] Variable "DisableWindowsUpdateAccess" set to "1"
[6] [16.11.2010 14:33:58] Key closed
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Make it for user .DEFAULT
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Execution of Registry_CUtest
[6] [16.11.2010 14:33:58] Registry key [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate] opened
[6] [16.11.2010 14:33:58] Variable "DisableWindowsUpdateAccess" is keeping its value "1"
[6] [16.11.2010 14:33:58] Key closed
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] And finally: The current user
[5] [16.11.2010 14:33:58]
[5] [16.11.2010 14:33:58] Execution of Registry_CUtest
[6] [16.11.2010 14:33:58] Registry key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate] opened
[6] [16.11.2010 14:33:58] Variable "DisableWindowsUpdateAccess" is keeping its value "1"
[6] [16.11.2010 14:33:58] Key closed
[1] [16.11.2010 14:33:58] ___________________
[1] [16.11.2010 14:33:58] script finished
[1] [16.11.2010 14:33:58] 0 errors
[1] [16.11.2010 14:33:58] 3 warnings
[1] [16.11.2010 14:33:58]
[1] [16.11.2010 14:33:58] opsi service version: 4
[1] [16.11.2010 14:33:58]
[6] [16.11.2010 14:33:58] Delete "c:\tmp\_winstbat_*"
[6] [16.11.2010 14:33:58] Search "c:\tmp\"
[6] [16.11.2010 14:33:58] JSON service request https://10.0.0.15:4447/rpc productOnClient_updateObject
[6] [16.11.2010 14:33:58] Registry key [HKLM\SOFTWARE\opsi.org\winst] opened
[6] [16.11.2010 14:33:58] Variable "RebootRequested" is keeping its value "0"
[6] [16.11.2010 14:33:58] Variable "LastLogFilename" is keeping its value "c:\tmp\instlog.txt"
[6] [16.11.2010 14:33:58] Variable "ContinueLogFile" is keeping its value "0"
[6] [16.11.2010 14:33:58] Variable "NumberOfErrors" is keeping its value "0"
[6] [16.11.2010 14:33:58] Key flushed
[6] [16.11.2010 14:33:58] Key closed
[6] [16.11.2010 14:33:58] Registry key [HKLM\SOFTWARE\opsi.org\winst] opened
[6] [16.11.2010 14:33:58] Key closed
Interessanterweise gibt der Befehl "GetRegistryStringValue("[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]Logon User Name")" mit "gastws" einen User aus, den es auf dem System garnicht mehr gibt...
Gruß,
Phil