I have written an application in QT which requires privilege level after running. Now I want to run this application after any user logs on the system. To do this I have done different strategies:

I have added the name and the path of application in Windows Registry:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

The strategy works well in many applications; however in apps which requires UAC privilege, it wont work!

Searching trough internet, I have read some notices about writing an auxiliary app which runs at startup and runs the main app. I did it but the auxiliary app executes the main app in the same privilege level it is. Meaning that since auxiliary app is ran as standard user app (not admin), it cannot call an app with higher privilege levels. So i am trapped in the same problem that I was before, if I increase the privilege level of auxiliary app!

Another solution was to put the application name in Windows Scheduler. This strategy is Manual! I need something to be done automatically!

What other strategies do you recommend?

Similar questions and discussions