# Changing VirtualStore (UAC Virtualized) registry entries with PowerShell

**URL:** <https://forums.powershell.org/t/changing-virtualstore-uac-virtualized-registry-entries-with-powershell/12500>\
**Category:** PowerShell Help\
**Created:** [May 3, 2019, 4:24am UTC](https://forums.powershell.org/t/changing-virtualstore-uac-virtualized-registry-entries-with-powershell/12500 "2019-05-03T04:24:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fgimian](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/fgimian/32/4905_2.png) [@fgimian](https://forums.powershell.org/u/fgimian)\
**Post date:** [May 3, 2019, 4:24am UTC](https://forums.powershell.org/t/changing-virtualstore-uac-virtualized-registry-entries-with-powershell/12500/1 "2019-05-03T04:24:51Z")

</div>

Hey guys, hope you’re doing great.

I have a tricky one that I’ve been struggling with for several days now. I’ve done about as much Googling and reading as I think is humanly possible at this point 🙂

I’m automating configuration of my software with PowerShell and am currently working on changing various settings on an older piece of 32-bit audio software which predates Vista.

It works perfectly in Windows 10 but of course uses [registry virtualization](https://docs.microsoft.com/en-us/windows/desktop/sysinfo/registry-virtualization) to store data when run as non-admin.

Typically, the setting would be placed in: **HKLM:\SOFTWARE\WOW6432Node\Voxengo\Voxengo Pristine Space Light VST**

With virtualisation, the setting is placed in: **HKCU:\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Voxengo\Voxengo Pristine Space Light VST**

Creating the entry directly in the destination works but the software simply doesn’t read the value as it should:

e.g.

```
New-Item `
    -Path 'HKCU:\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Voxengo\Voxengo Pristine Space Light VST' `
    -Force

New-ItemProperty `
    -Path 'HKCU:\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Voxengo\Voxengo Pristine Space Light VST' `
    -Name BlockSize `
    -Type String `
    -Value '1'
```

The software simply doesn’t read this value and this is also seen in Process Monitor:

[https://1drv.ms/u/s!AobnWXPnBeTB4WHdbNg7iifQEsCc](https://1drv.ms/u/s!AobnWXPnBeTB4WHdbNg7iifQEsCc)

By comparison, this is what it looks like when I change the setting via the software itself and it is properly saved in the registry:

[https://1drv.ms/u/s!AobnWXPnBeTB4WBLp-fE9o-Hs1ZP](https://1drv.ms/u/s!AobnWXPnBeTB4WBLp-fE9o-Hs1ZP)

Based on my research, writing directly to VirtualStore is not the right way to go, let alone writing to WOW6432Node, but I have found very little information on how to simulate both a 32-bit and UAC virtualized environment in 64-bit PowerShell while running as admin.

The closest solution I have is…

1. Start PowerShell (x86) with regular user rights (not admin)
2. Go to Task Manager and find the process in the Details tab
3. Enable UAC Virtualization via right click context menu
4. Run the following code

```
New-ItemProperty `
    -Path 'HKLM:\SOFTWARE\Voxengo\Voxengo Pristine Space Light VST' `
    -Name BlockSize `
    -Type String `
    -Value '1'
```
I haven't found any way to automate this properly at this stage and am left rather confused about how to move forward with this particular task.

Any help at all would be greatly greatly appreciated!!!

Huge thanks in advance  
Fotis

---

<div class="post-metadata">

**Author:** ![postanote](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@postanote](https://forums.powershell.org/u/postanote)\
**Post date:** [May 4, 2019, 1:40am UTC](https://forums.powershell.org/t/changing-virtualstore-uac-virtualized-registry-entries-with-powershell/12500/2 "2019-05-04T01:40:41Z")

</div>

This is not a PowerShell code issue, but a software specific one. Installer in general can do many things and unless you monitor all it is doing, during the install, regkeys only, may not be the end all be all of hooking it does to find it’s settings.

So, just like other gold imaging an OS for distribution efforts.

Build out your pristine OS.  
Install all needed software  
Make any other wanted / needed configuration.  
sysprep the host.  
Burn the image.

Or if it is just this software.

Fire up SysInternal, procmon and region.  
Install the software and make whatever settings you choose.  
Export all settings it created, including the registry  
When you nee to rebuild, reimport the exported settings.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:32pm UTC](https://forums.powershell.org/t/changing-virtualstore-uac-virtualized-registry-entries-with-powershell/12500/3 "2024-05-16T20:32:52Z")

</div>


