Re: Regitry KEY HKEY_USERS
in my testing - if I make a change, the registry write-back goes directly to the HKEY_USERS S- profile.
use RegShot (beta) and take 1st shot, make your changes and take 2nd shot, and Compare and you will see where the registry changes are made.
>> find regshot on sourceforge distro...
I am in the same enigma -- I believe I need to not load hive items to modify HKEY_USERS specific profile S- changes.
any new help would be appreciated since 2000... ha!
Andy
for example
Option Explicit On
Imports System
Imports System.Management
Imports System.ServiceProcess
Imports Microsoft.Win32
Imports Microsoft.VisualBasic
Public buf As String
Public cnt
Public HKU_SID(10)
Public HKU_ProfilePath(10)
Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click
Call GetHKU()
'display in log window
For x = 0 To cnt
'only display is part of the local users path
If UCase(Mid(HKU_ProfilePath(x), 1, 3)) = "C:\" Then
If InStr(HKU_ProfilePath(x), GetUserName()) Then
z_gg_listbox.Items.Add(HKU_SID(x) & " : your profile-> " & HKU_ProfilePath(x))
End If
z_gg_listbox.Items.Add(HKU_SID(x) & " : " & HKU_ProfilePath(x))
End If
Next
End Sub
Private Sub OutputRegKey(ByVal RegKey As Microsoft.Win32.RegistryKey)
Dim Keyname As String
Dim Valuename As String
For Each Valuename In RegKey.GetValueNames
If Valuename = "ProfileImagePath" Then
Debug.Print("ValueName: " & Valuename & "=" & RegKey.GetValue(Valuename).ToString)
'z_gg_listbox.Items.Add("ValueName: " & Valuename & "=" & RegKey.GetValue(Valuename).ToString)
HKU_ProfilePath(cnt) = RegKey.GetValue(Valuename).ToString
End If
Next
For Each Keyname In RegKey.GetSubKeyNames
Using Key = RegKey.OpenSubKey(Keyname, False)
If Mid(Keyname, 1, 2) = "S-" Then
Debug.Print("KeyName: " & Keyname)
HKU_SID(cnt) = Keyname
cnt = cnt + 1
End If
OutputRegKey(Key)
End Using
Next
End Sub
Re: Regitry KEY HKEY_USERS
for example:
using regshot -- I made some desktop changes and look what regshot noticed in overall changes.
HKEY_CURRENT_USER was not affected.
the actual USERs PROFILE under HKEY_USERS was modified.
Regshot 1.8.3-beta2
Comments:
Datetime:2014/9/21 17:12:10 , 2014/9/21 17:12:30
Computer:GENERAL-A6B877C , GENERAL-A6B877C
Username:Test , Test
----------------------------------
Values modified:6
----------------------------------
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Control Panel\Desktop\DragFullWindows: "1"
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Control Panel\Desktop\DragFullWindows: "0"
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Control Panel\Desktop\UserPreferencesMask: 9E 3E 07 80
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Control Panel\Desktop\UserPreferencesMask: 90 12 03 80
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Control Panel\Desktop\WindowMetrics\MinAnimate: "1"
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Control Panel\Desktop\WindowMetrics\MinAnimate: "0"
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewAlphaSelect: 0x00000001
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewAlphaSelect: 0x00000000
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarAnimations: 0x00000001
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarAnimations: 0x00000000
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\VisualFXSetting: 0x00000001
HKU\S-1-5-21-1715567821-73586283-839522115-1008\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\VisualFXSetting: 0x00000003
----------------------------------
Total changes:6
----------------------------------
Re: API Registry HKEY_USERS
Quote:
Originally Posted by
Stonebrook
Hi,
i'd like to access a subkey under HKEY_USERS, but i dont know where i can find then Key under the .DEFAULT Key ("S-1-5-21-254811832-206464375-1947940980-1000")- that key is depending from the User.
!! If i have more than 1 user there a more then 1 Keys - so i can not take allways the 2nd Key in HKEY_USERS !!
Where Can i find and read this unique KEY for the current user ?
HKEY_USERS\S-1-5-21-254811832-206464375-1947940980-1000\Software\Microsoft\Internet Explorer\MenuExt
Thanx
The key for the current user is going to be one of the keys listed in HKEY_USERS, but there's no way to determine which one (it's in an encoded number that looks like S-1-5-21-254811832-206464375-1947940980-1000, and the computer just seems to somehow know which one is the right one). However, that key is mirrored in HKEY_CURRENT_USER, so you don't need to know which key in HKEY_USERS represents the current user. Just use HKEY_CURRENT_USER instead.