Jump to content

Getting unique HKEY_USERS\S-1-xxx id


tip

Recommended Posts

Hi,

Is there a way to obtain that unique user id in registry HKEY_USERS\S-1-5-xxxxxxxxx after a fresh WinXP install??

That id changes every time with a fresh OS install and I need it for some explorer button settings etc.

Thanks in advance...

Link to comment
Share on other sites


Hi,

Is there a way to obtain that unique user id in registry HKEY_USERS\S-1-5-xxxxxxxxx after a fresh WinXP install??

That id changes every time with a fresh OS install and I need it for some explorer button settings etc.

Thanks in advance...

As you have stated and obviously discovered from testing ...

the keys are unique and change with each new installation, you cannot copy them from one install to the next.

I remember a similar posting here @ msfn, about 1.5-2 yrs ago, ...

The unique key is stored in a common key [HKCU]? which can be queried for the result..

you may want to try thr search function to try and find this post i speak of... Yzowl may have been involved in the converstion

because his extensive knowledge of commandline usage seems to ring a bell for this topic too. (regsearch commands)

shark

Link to comment
Share on other sites

Thank you for pointing I found that post and it solved the problem...

For everyone suffering the same problem or seeking the same post I thought it would be nice to post it here too...

I'm using this code to create a registry file with my windows explorer toolbar settings...

@echo off&setlocal enableextensions

for /f "tokens=*" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" /s^|findstr "S-1-5-"') do (

for /f "tokens=1,3 delims= " %%b in ('reg query "%%~a" /v "ProfileImagePath"') do (

if errorlevel 0 (

echo/%%~c|find "%userprofile%">nul

if errorlevel 0 set UserSID=%%a

)

)

)

if not defined UserSID echo/ SID not found&&endlocal&goto :eof

set UserKey=HKEY_USERS\%UserSID:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\=%

Echo Windows Registry Editor Version 5.00 >> ExplorerSetting.reg

Echo. >> ExplorerSetting.reg

Echo [%UserKey%\Software\Microsoft\Internet Explorer\Toolbar] >> ExplorerSetting.reg

Echo "LinksFolderName"="Links" >> ExplorerSetting.reg

Echo "Locked"=dword:00000001 >> ExplorerSetting.reg

Echo "{710EB7A1-45ED-11D0-924A-0020AFC7AC4D}"=hex:07,00,00,00,ee,03,00,00,7e,69,79,\ >> ExplorerSetting.reg

Echo 1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,20,01,00,00,00,00,00,00,ef,03,00,00,\ >> ExplorerSetting.reg

Echo 7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,21,01,00,00,00,00,00,00,f0,\ >> ExplorerSetting.reg

Echo 03,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,30,01,00,00,04,00,\ >> ExplorerSetting.reg

Echo 00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ >> ExplorerSetting.reg

Echo 00,00,00,00,00,f2,03,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,\ >> ExplorerSetting.reg

Echo 33,01,00,00,04,00,00,00,31,70,00,00,a1,b7,0e,71,ed,45,d0,11,92,4a,00,20,af,\ >> ExplorerSetting.reg

Echo c7,ac,4d,31,70,00,00,04,00,00,00,f4,03,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,\ >> ExplorerSetting.reg

Echo 00,c0,4f,c9,9d,61,25,01,00,00,04,00,00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,\ >> ExplorerSetting.reg

Echo 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,fd,03,00,00,a1,b7,0e,71,\ >> ExplorerSetting.reg

Echo ed,45,d0,11,92,4a,00,20,af,c7,ac,4d,11,70,00,00,04,00,00,00,ff,ff,ff,ff,00,\ >> ExplorerSetting.reg

Echo 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,04,\ >> ExplorerSetting.reg

Echo 00,00,a1,b7,0e,71,ed,45,d0,11,92,4a,00,20,af,c7,ac,4d,18,70,00,00,04,00,00,\ >> ExplorerSetting.reg

Echo 00,01,04,00,00,a1,b7,0e,71,ed,45,d0,11,92,4a,00,20,af,c7,ac,4d,19,70,00,00,\ >> ExplorerSetting.reg

Echo 04,00,00,00,02,04,00,00,a1,b7,0e,71,ed,45,d0,11,92,4a,00,20,af,c7,ac,4d,1a,\ >> ExplorerSetting.reg

Echo 70,00,00,04,00,00,00 >> ExplorerSetting.reg

endlocal&goto :eof

Thanks again Shark, this forum is very lucky to have you...

P.S.: Credits to Yzöwl

Link to comment
Share on other sites

I don't know if I provide the correct information but if you wish to pre-set Windows Explorer button, there is a registry tweak which i use such as

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar]
"{710EB7A1-45ED-11D0-924A-0020AFC7AC4D}"=hex:07,00,00,00,ee,03,00,00,7e,69,79,\
1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,20,01,00,00,00,00,00,00,ef,03,00,00,\
7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,21,01,00,00,00,00,00,00,f0,\
03,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,30,01,00,00,04,00,\
00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,f1,03,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,\
23,01,00,00,04,00,00,00,f2,03,00,00,7e,69,79,1e,c5,9c,d1,11,a8,3f,00,c0,4f,\
c9,9d,61,33,01,00,00,04,00,00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,31,70,00,00,a1,b7,0e,71,ed,45,d0,\
11,92,4a,00,20,af,c7,ac,4d,31,70,00,00,04,00,00,00,f4,03,00,00,7e,69,79,1e,\
c5,9c,d1,11,a8,3f,00,c0,4f,c9,9d,61,25,01,00,00,04,00,00,00,fd,03,00,00,a1,\
b7,0e,71,ed,45,d0,11,92,4a,00,20,af,c7,ac,4d,11,70,00,00,04,00,00,00,ff,ff,\
ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,ff,03,00,00,a1,b7,0e,71,ed,45,d0,11,92,4a,00,20,af,c7,ac,4d,13,70,00,00,\
04,00,00,00,ff,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,04,00,00,a1,b7,0e,71,ed,45,d0,11,92,4a,00,20,af,c7,\
ac,4d,18,70,00,00,04,00,00,00,01,04,00,00,a1,b7,0e,71,ed,45,d0,11,92,4a,00,\
20,af,c7,ac,4d,19,70,00,00,04,00,00,00,02,04,00,00,a1,b7,0e,71,ed,45,d0,11,\
92,4a,00,20,af,c7,ac,4d,1a,70,00,00,04,00,00,00

Of course, the code here are my own pre-set. U can preset your own explorer button, then export the registry key

(I'm using XP Pro)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...