Question

I have an old vb.net 1.1 installer, which works fine on winxp, that I need to adapt so that it runs on win7. The architecture of the installer is pretty simple. It consists of 2 apps where the first one will launch the second app (it's the one doing the actual installation) to be executed under a power user credentials calling CreateProcessWithLogonW.

After struggling for a while I came up with the UAC being in the middle. As far as I know there's no workaround to this besides disabling UAC on evey single machine which is something we can't do.

Then investigating I came up to a way of requiring elevtion. So I applied this to the second app which when double clicked it launches UAC and does the job as expected. But when I try to execute it from the first app (the launcher), through CreateProcessWithLogonW, I still get error 740 ERROR_ELEVATION_REQUIRED and obviously UAC is never launched.

Is there something else that I should be looking at? Should I be using another API to launch the process on windows 7?

Thanks in advanced!

Was it helpful?

Solution

Do you have access to both apps? You should research bootstrappers. Basically its what your dealing with. I'm familiar with WIX and its pretty easy to create a bootstrapper (setup file) that chains together multiple install files. You can also specify "elevation needed" by operating system. You can download the installer still from microsoft, so maybe there's something funky about yours. I've rolled out 1.1 installs hands free on hundred of machines, most all of them boot strapped with other prerequisites for my final MSI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top