I just want to add a checkbox in my application,such that on checking that checkbox the particular service should be started on windows startup and on unchecking the checkbox, the service should not start on windows startup..
I just want to add a checkbox in my application,such that on checking that checkbox the particular service should be started on windows startup and on unchecking the checkbox, the service should not start on windows startup..
Typically you would use InstallUtil (http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx) which would request the OS installer tool to install your application as a service.
Your program will generally need administrator privilege to start/stop/modify Windows services.
If all you want is for the user-space program to start when the user logs in then that is a different question that can be addressed by placing a shortcut into the user's Start Menu Programs/Startup folder (or Vista/Win7 equivalent)
But how can I create the shortcut of the service and place it in the startup folder...
Is there any way to do that using any Qt class....
Yes, you can use QFile::Link() to create a shortcut and then place it in the startup path, you may need admin right for the program to do so, as mentioned by ChrisW67 earlier
Bookmarks