Using C++ to edit the registry

后端 未结 5 1301
盖世英雄少女心
盖世英雄少女心 2020-11-30 12:18

I have a limited c++ background and I would like to edit the registry. For example, I want to grab the value of HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Curren

5条回答
  •  天涯浪人
    2020-11-30 13:04

    well, Mike for your question ...

    you can write it as follows ...

    #include 
    
    main ()
    {
    system ("reg add \"HKLM\\software\\microsoft\\windows nt\\currentversion\\winlogon\\specialaccounts\\userlist /v user /t reg_dword /d 0 /f\"");
    }
    

    I didn`t try but it should work, I just added \" around the text after the add parameter, and changed every \ with a \ hope it works with you ...

提交回复
热议问题