Jump to content

Is this reg string unique to each install?


Recommended Posts


No no it's cool :D I was just wondering since you did not use a .txt in the example:

for /f "tokens=5 skip=2" %%i in ('reg query HKCU\Identities /v "Default User ID"') do set Identity=%%i

Do you know what the key S-1-5-21 is?

Link to comment
Share on other sites

as far as what it pertains to on the system, no...but i do know I have a S-1-5-21 key, so do you, from your quote in the first post, and so does every other pc ive ever been on...as I edited in my post before, I said what keys are under HKU, I have not seen more or less, just those...and the S-1-5-21 keys are the only ones different and thats only cuz of the characters after it...I could tell you what my key is, but its not gonna be the same as yours...

Also, the reason a temp.txt was not needed for Identities was because we didnt need to use |...Also, another reason is because in the example I was able to use the full subkey...whereas, since we do not know what the FULL subkey will be from pc to pc, I have to pull all subkeys, find the one we want, and set it to a variable.

Edited by evilvoice
Link to comment
Share on other sites

now, your gonna have to figure out what the reg add command you need to add...cuz I cant really tell if Gestures is a keyname or subkey from your quote...but if you open regedit and a cmd window and do a reg add /? you should be able to come up with the right command.

Edited by evilvoice
Link to comment
Share on other sites

Thanks man. This helps alot! :D

One thing though, why do I need to make the temp.txt?

Also is not S-1-5-XX really unique?

@echo off
for /f "delims=\ tokens=2" %%i in ('reg query HKU ^| findstr /V /E Classes ^| findstr "S-1-5-21"') do (set SID=%%i)&(echo. your Security ID is %SID%)

What is a SID (Security ID)?

Edited by Bilou_Gateux
Link to comment
Share on other sites

LOL i did not mean it that way...just saying that it was nice to get a full method going...I really wasnt even going to work on it today, but I decided I had some time...I just assumed you already had the method...though there is always a chance to learn...I had no idea about the ^...hell that would save a lot of my temp.txt's running around...

Link to comment
Share on other sites

Thanks man. This helps alot! :D

One thing though, why do I need to make the temp.txt?

Also is not S-1-5-XX really unique?

@echo off
for /f "delims=\ tokens=2" %%i in ('reg query HKU ^| findstr /V /E Classes ^| findstr "S-1-5-21"') do (set SID=%%i)&(echo. your Security ID is %SID%)

What is a SID (Security ID)?

Actually that did just output "your security ID is"

Link to comment
Share on other sites

if you're not working in a cmd window when you run it, then change the last line to

  • pause&endlocal&goto :eof

<Edit>

If you're running as the Administrator, the SID key always ends in -500

</Edit>

Edited by Yzöwl
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...