Does Visual Studio run Tests with a less privileged process?
        Posted  
        
            by Filip Ekberg
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Filip Ekberg
        
        
        
        Published on 2010-05-07T07:25:01Z
        Indexed on 
            2010/05/07
            7:28 UTC
        
        
        Read the original article
        Hit count: 205
        
I have an application that is supposed to read from the Registry and when executing a console application my registry access works perfectly.
However when I move it over to a test this returns null:
var masterKey = Registry.LocalMachine.OpenSubKey("path_to_my_key");
So my question is:
Does Visual Studio run Tests with a less privileged process?
I tested to see what user this gave me: var x = WindowsIdentity.GetCurrent().Name; and it gives me the same as in the console application. So I am a bit confused here.
© Stack Overflow or respective owner