Qt Code:
To copy to clipboard, switch view to plain text mode
Doesn't work.
I need to execute a regedit file with every instance of my app.
Qt Code:
To copy to clipboard, switch view to plain text mode
Doesn't work.
I need to execute a regedit file with every instance of my app.
Use system() with regedit.exe or QProcess with regedit.exe or insert the information into the registry using QSettings. And try expressing your goals more clearly next time - I though you wanted to do something completely different.
Sorry if I didin't sound clear.
Qt Code:
QStringList arguments; arguments << "/S" << "ZeMessenger.reg"; QProcess myProcess; myProcess.start(program, arguments); if (!myProcess.waitForStarted()) { return false; }To copy to clipboard, switch view to plain text mode
That code returns false. I'm affraid I need administrator rights to do such a command. I guess the only alternative to add regs field silently is during the installation.
For starters, you don't actually need to launch regedit as the association for .reg is to open regedit, although that won't fix your problem.
If you can't run .reg files, then chances are you won't be able to modify the registry keys even with QSettings. If this is a work machine that's locked down, then request permission to get your job done, otherwise if it's a personal machine, add yourself to the Administrators group.
Bookmarks