I am working on a program for my application which needs to copy over some files from machine A to to C$ share of Machine B.This is specific to machines in a same workgroup. I did some good research and found that if i access Machine B registry remotely and set "LocalAccountTokenFilterPolicy" to 1 then i can access C$ share. But the code snippet below to open the registry is giving me access denied exception.I am interested to know is there any other approach to access the C$ share if i have the Admin account details and machine-name of the machine B.I figured out that the editing registry is not really possible in workgroup.
code snippet:
var key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "XXXX");
Console.WriteLine("Before OpenSubKey");
var key2 = key.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy");