Not able to access registrty beyond a certain level, does it need admin rights? If yes, how to do it?



  • I'm trying to access this location in windows registry - "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\MySampleTask".

    I'm able to reach till & fetch value till - "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule"

    QSettings currVersionKey("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\",QSettings::NativeFormat);
    QStringList keylist = currVersionKey.childGroups();
    bool bStatus = keylist .contains("TaskCache");
    if(bStatus )
    {
        QVariant taskCache = currVersionKey.property("TaskCache"); // RETURNS NULL
    }
    

    How to access remaining folder i.e. "TaskCache\Tree\MySampleTask" ? Is there any way? By elevating to admin rights?

    Thanks in advance.



  • @Tusharh
    If you want the value of the registry entry "TaskCache" you should use QSettings::value(QString key) QObject::property(QString name) gives you the property of your QSettings object


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.