Registry virtualization

ikantspelwurdz

Well-known member
Joined
Dec 8, 2009
Messages
49
Programming Experience
1-3
I am trying to do what this article suggests:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa965884(v=vs.85).aspx

Here is my code:
VB.NET:
Imports Microsoft.Win32

Module Module1

    Sub Main()
        Dim regKey As RegistryKey
        regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
        regKey.CreateSubKey("myApp")
        regKey.Close()
    End Sub

End Module
I am using Windows 7 Pro, x86.

I actually *do* want to use registry virtualizing here. If my program is run without admin privileges, it should go here:
VB.NET:
HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\myApp
Presently, if I run it without admin privileges, it just crashes. How can I make it use the virtual store, as described in the page?
 
Top Bottom