[Moved] automatic run
-
What you're asking doesn't really have something to do with Qt, this is a platform specific issue.
In your case, on Windows, you can put a key on the registry, in a particual location, see "here":http://www.bleepingcomputer.com/tutorials/tutorial44.html
-
[quote author="Rahul Das" date="1313846692"]put it in in the start up folder. That will be the easiest!
Eg:
C:\Users<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup[/quote]Yay for fast solutions! And yay for crappy users which decide they'd gladly play around with your setup, and will just delete your shortcut from the startup folder, then call you saying with angry voice "Your application doesn't work!!!! Fix it!!!".
In my opinion, the best solution for this would be to add it to the registry. End users doesn't know how to use RegEdit and even if they know, it's not likely to play with it too much :P
QSettings with native format ftw :P
P.S.: Haven't tested myself if QSettings works for Windows\CurrentVersion\Run and alike registers, actually I am linux developer, developing apps for windows and linux and don't want to be bothered with windows registry, but from what I've read about QSettings, it should work.
-
Not sure about that. I think it is a bonus if a user can easily modify behaviour like this. On the other hand, it is easy to fix a missing entry in the start up folder from the application itself. You can check if it is still there, and offer the user to create it anew if not.
QSettings can write to any registry key you have write access to.
-
I meant: checking programatically, from within your application itself.
OT:
For users not telling what they are actually doing, we have logging :) Use a logging framework in your application that logs all relevant events (at different levels), input files, etc. so that you can easily reproduce the issues they are reporting. No need for them to tell you what they did, just make them send you their log file :) -
True, logging framework/implementation would be able to easily do the trick for you. But even then there will be people which will decline deletion of the shortcut, haha.
So far I wasn't needing such logging in my app, but I might consider getting one, just to have something built for reference ;-)