diff --git a/LANCommander/Snippets/Examples/Get User Registry Virtual Store.ps1 b/LANCommander/Snippets/Examples/Get User Registry Virtual Store.ps1 new file mode 100644 index 0000000..09a8c5e --- /dev/null +++ b/LANCommander/Snippets/Examples/Get User Registry Virtual Store.ps1 @@ -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\" -Name "KeyName" -Value "New Value" -Force \ No newline at end of file