View Full Version : Create a shortcut in the Mainmene of the OS

16th July 2010, 15:18

is it possible to create a shortcut in the main menu of the operating system?
My application has to create a shortcut in the autostart folder of the e.g. start menu from windows.

If yes, could someone give me a hint where to find such things?

16th July 2010, 19:47
Hi HeReSY,

How about just creating the file that you want under the Current Users's Start Menu?
e.g.: C:\Documents and Settings\Wladek\Start Menu.

You need it to be a specific Shortcut? (*.ink). For this, don't know if it is possible.


16th July 2010, 19:55
With Qt, i don't think that you can... (you don't even know where the user <your client> will copy your executable so even if you "hard code" an shortcut and save it to Desktop/ or Some Menu... you don't know the path to your application)

But you can (and it's recommended to) use an installer (for each OS you compile) and that will install your application (with the necessary dll's and stuff) and create shortcuts for it.

16th July 2010, 19:57
Note that "C:\Documents and Settings\" doesn't exist on Windows 7, it's "C:\Users". I don't have access to a Win7 PC to check if there's a Start menu under there.

Much better to use an OS-specifc installer to do the job for you.

19th July 2010, 17:39
Thanks for the replies. I found a solution that i have integrated into my application.

We talk to our customer and he said, that he only wanted, that the application is stated, when windows started (autorun).
Now i use QSettings and some regestry entries to create this behavior.


20th July 2010, 09:56

Could you please detail the solution that you adopted?
Some example code would also be nice :)