locked
Accessing registry and services remotely on windows 8 RRS feed

  • Question

  • Hi,

    I want to acess registry and other stuff like file system, services etc remotly on windows 8.I have code which working fine on windows 7 without any modification. however on windows 8 it was failing to connect remote registry.

    I have found a workaround to this problem by setting the following registry key on remote win8 mahine:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System under which i have added following dword value and set it to 1.

    LocalAccountTokenFilterPolicy REG_DWORD 1

    Currenly i have to add and this registry key manullay and set it to 1 on remote machine.I need a way so that i can set this key on remote mahine(programmatically).

    I have tried by login to remote mahine with logonuser() and impersonateuser() with admin privilages and try to access this regisry key, though the user has permission to acess this key.but if this key is not set on remote mahine or it has value 0.then all remote operations will fail.It is default behaviour on windows 8.

    Is there any othe way to acess registry remotly from remote macine runnig on windows 8?


    Niranjan


    Tuesday, February 12, 2013 3:21 PM

All replies

  • As i mentioned in my question i don't want to modify this value manually by logging in to remote win8 machine.

    >This is not a c++ question.

    I want to modify this key programmatically using c++ code. i am using RegConnectRegistry() function to connect remote registry which is failing if remote machine has windows 8 installed and this key is not set.

    > log into the remote machine as administrator via Remote desktop connection (rdp), run Regedit and set this value. Or, deploy win8 from an image where this value is set. 

    there are multiple windows 8 machines which i want to access remotely and it is not possible to access each machine using RDP and also i can't guarantee that whether this key is set or not on these machines

    I have admin credential  to access remote machines but whatever i need do is by c++ code from another machine not by logging to remote machines.

    i am connecting to remote machine using WNetAddConnection2() which is working on windows 7 and windows xp.


    Niranjan

    Wednesday, February 13, 2013 5:53 AM
  • Thank you for inforamtion.

    WinRm c++ API:

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa384468(v=vs.85).aspx

    Is this useful to me?


    Niranjan

    Thursday, February 14, 2013 6:20 AM
  • Hello,

    According to your description, I think General Windows Desktop Development Issues forum is a better forum for this issue. This thread will be moved to that forum. Thanks for your understanding.

    Regards,


    Damon Zheng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 26, 2013 11:46 AM