In my Qt5.5 app I'm trying to write to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
registry key, to enable autorun on every account, using QSettings, but I can't do it even with Administrator Priviliges. Could you tell me how should I do it right way? If I try to use this code with HKCU to enable autorun to current user, it's working.
QSettings bootUp("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
bootUp.setValue("/MyApp", "\"" + QDir::currentPath() + "/MyApp.exe\"" + " -a -u");
HKCU
too to compare? – John_WestAllUsers
-setting supportingtrue
andfalse
, but can't find anything in the docs on how to use it. stackoverflow.com/questions/59510656/… – Thorsten Schöning