Add snippet for writing registry entries in HKU virtual stores

This commit is contained in:
Pat Hartl 2023-03-15 21:00:55 -05:00
parent 02d402c887
commit 449c253db9

View file

@ -0,0 +1,4 @@
$User = New-Object System.Security.Principal.NTAccount($env:UserName)
$SID = $User.Translate([System.Security.Principal.SecurityIdentifier]).value
# The OS might force your game to read/write to the user's virtual store. This will write a key to the correct SID's virtual store.
New-ItemProperty -Path "HKU:\$SID\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\<Path>" -Name "KeyName" -Value "New Value" -Force