0

I'm trying to access this location of the windows registry - "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\MySampleTask".
This is the entry of a task created in windows scheduler.

I'm able to reach till here & fetch value -
"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 in Qt? By elevating to Administrator rights or any method of QSettings that supports Administrator rights?

hollopost
  • 1,060
  • 9
  • 28
Tushar
  • 412
  • 5
  • 11
  • `regedit` can show you the permissions on each node in the tree. The right click menu has "Permissions..." and using that you can view the permissions set for different users and groups. – Richard Critten Mar 31 '17 at 12:16
  • `TaskCache` usual have permission for *System* (full control) and *Administrators* (read only) - so you need admin rights for read this keys and subkeys and impersonate *LocalSystem* to modify – RbMm Mar 31 '17 at 12:21
  • You will be able to access them once you grant your application the proper rights. There's nothing else to be done on the Qt side of things: it will "just work" once you obtain proper rights. This question is then a duplicate of the question about obtaining such rights. – Kuba hasn't forgotten Monica Mar 31 '17 at 12:23

0 Answers0