PDA

View Full Version : How to give the full permission to the static build exe?



Gokulnathvc
7th December 2011, 09:16
How to give the full permission to the static build exe? I would like to give full permission and privileages to the application which accesses hard drive, how to give that during static building in commercial version?

ChrisW67
7th December 2011, 23:21
It would help if you told us what you want "full permission" to do and in what environment. Permission to perform certain actions is granted by the operating system not by Qt, and is granted different ways depending on what you actually need.

On Windows you can embed an application manifest requesting the application run as an administrator. When you do this your program will pop up a UAC permission prompt when run, and will only run if permission can be/is granted. If you don't want the prompt, e.g. for a daemon process, then you must arrange for Windows the start the application as a privileged user: this is something you do in your installer and will require administrative privileges itself. If you only want "full permission" to a certain directory then that can be arranged by your installer.

I suspect you either have to run as an Apple-y root user, use something like sudo, or set file permissions on OS X. Perhaps someone else can enlighten us how you do it in OS X.