Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. [Moved] automatic run
Forum Updated to NodeBB v4.3 + New Features

[Moved] automatic run

Scheduled Pinned Locked Moved Brainstorm
12 Posts 6 Posters 4.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kitten
    wrote on last edited by
    #1

    hi to everyone
    how can i make my program automarically run when i turn on my pc on windows?

    www.kitten.mihanblog.com

    1 Reply Last reply
    0
    • O Offline
      O Offline
      octal
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rahul Das
        wrote on last edited by
        #3

        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


        Declaration of (Platform) independence.

        1 Reply Last reply
        0
        • O Offline
          O Offline
          octal
          wrote on last edited by
          #4

          Yes, this is the second solution :)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            Moved from the "General/Deskopt" to the "Brainstorm" forum, as it's not Qt related.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Robbin
              wrote on last edited by
              #6

              [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.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                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.

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  Robbin
                  wrote on last edited by
                  #8

                  Yeah, agreed, you CAN check and all, but end users tends to forget to tell you they did things like that when you do support for your app (been there, done that :P)

                  Oh well, that's two solutions for one thing, I guess kitten will be happy ;-)

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #9

                    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 :)

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      Robbin
                      wrote on last edited by
                      #10

                      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 ;-)

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        andre
                        wrote on last edited by
                        #11

                        Don't build one before you have given the existing ones a good lookover. No need to reinvent the wheel yet again. Personally, I like the LibQxt one.

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          Robbin
                          wrote on last edited by
                          #12

                          Yeah, I'll look into it once I decide to use such logging, thanks for the input.

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved