PDA

View Full Version : Developping a setup for Vista/Seven



Vinny
2nd May 2012, 14:48
Hi all,

I'm currently trying to make a fully operationnal setup program in order to deploy my application on Vista and Seven systems (both 32 and 64bit, but the executable is the same).
My issue concerns the setup program itself, which is not detected by UAC as a setup program (It is actually executed after an Winrar-created SFX extraction, I don't know if thats relevent). So the UAC doesn't ask the user for administrator rights, and the setup runs in user mode. As the default path is in program files, the setup doesn't have rights to write its files. Strange thing though, QFile::copy() doesn't produce any error.
What I would like is the setup to ask for administrator rights elevation as soon as it starts. I tried to embed a Installer.exe.manifest file in the executable resources and adding embed_manifest_exe option in the *.pro file.
What is the proper way to perform this ?

Furthermore, when running the application, some files inside the installation directory may be written. Again it is mandatory to run explicitely the application as administrator to avoid unpleasant behaviours, but this time I guess it is more of an application design error.

Vinny
4th May 2012, 16:21
Am I in the wrong section or something ? This section of the forum seems to be really dead right now...

ChrisW67
6th May 2012, 08:17
Nothing you do to the archived Qt program or its resources will affect the executable wrapper that Winrar puts on the bundle. If the Winrar executable wrapper contains no manifest specifying privileges (it may, I don't know) then Windows Vista/7 will trigger elevation if the name of the program being run contains the magic word "setup" or "install" IIRC. To make this foolproof you should replace/install a manifest on the Winrar wrapped archive or use a scripted installer tool (NSIS, Windows installer etc.) to build your deployment bundle.

Vinny
7th May 2012, 15:53
What you're implying here is interessant. My Winrar self extractible executable is named with Setup in it's name, indeed...
So I would have a win7 specific issue, in no way related to Qt ? Wouldn't the system be capable of detecting when the Qt installer executable (inside the selfextract one) is executed ?
As these issues seem to be on the OS side I guess I should try on some windows forum...

Bamboolix
28th June 2012, 14:49
Hello everyone,

Simple question, has your binary been compiled with a manifest which would enable it at least prompt the UAC's ?