Retrieve user GUID from reg to set as VAR?

7 posts in this topic

MrChris 0

Would I be able to retrieve a logged in users GUID ID from the reg and set it as a var? for example my current GUID ID is S-1-5-21-3783412348-3147957303-627458716-1003 I was thinking of setting that as a var. I have a Key and a value that I need to be dynamic but gets stored in the HKU\S-1-5-21-3783412348-3147957303-627458716-1003 Key.

The closest I could come up with is below but im not sure if this will work on any XP/2003 system. This is just a test to see if it will retrieve the correct code. All I really need is to be able to set that KEY as the $var. Even so I kinda need to full path to be the var. not just the GUID.

Share this post

Link to post

Share on other sites

PsaltyDS 26

Would I be able to retrieve a logged in users GUID ID from the reg and set it as a var? for example my current GUID ID is S-1-5-21-3783412348-3147957303-627458716-1003 I was thinking of setting that as a var. I have a Key and a value that I need to be dynamic but gets stored in the HKU\S-1-5-21-3783412348-3147957303-627458716-1003 Key.

The closest I could come up with is below but im not sure if this will work on any XP/2003 system. This is just a test to see if it will retrieve the correct code. All I really need is to be able to set that KEY as the $var. Even so I kinda need to full path to be the var. not just the GUID.