0

I have already found out, how I create my own protocol for windows (LINK).

Now I have tried to create such an entry with my QT application, but I have some problems:

  1. I'm not able to write in HKEY_CLASSES_ROOT. I think, I need administrator privileges, but how do I achieve that? I don't want, that my app is always running in Admin-mode.

  2. I don't know, how to write the "(Standard)"-Entries. If I create this entries manually and export them as a reg-file this "(Standard)"-Entries look like

[HKEY_CLASSES_ROOT\myprotocol]
@="URL:SomeDescription"

Is there any possibility to create these entries with Qt's QSettings?

Community
  • 1
  • 1
BloodyD
  • 963
  • 6
  • 17

1 Answers1

1

For the QSettings try this.

For the admin rights, NO, admin rights are needed to create the registry entries.

MC ND
  • 65,671
  • 6
  • 67
  • 106
  • thanks for the settings link... I haven't read the docs till the end :) blame on me. Actually, I'm able to create "HKEY_CURRENT_USER" entries, but "HKEY_CLASSES_ROOT" is admin-only. Is it a good idea to create a *.reg-file and then execute it with "regedit.exe"? – BloodyD Nov 15 '13 at 16:47
  • as a workaround I have created another executable and run this, if there was no registry found. According to this [post](http://stackoverflow.com/a/6418873/1360842) I was also able to run the executable as admin, so the registry entries can be written correctly. – BloodyD Nov 16 '13 at 11:59