cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
davebart
Level 2

Disable UAC during install?

Does anyone know if there is a way to disable UAC during an installation?
Labels (1)
0 Kudos
(4) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

It's not possible without at least seeing a UAC prompt first, and possibly rebooting the machine, if by "disabling UAC" you mean what you can do in the control panel. What actual problem symptoms are you trying to address?
0 Kudos
davebart
Level 2

MichaelU wrote:
It's not possible without at least seeing a UAC prompt first, and possibly rebooting the machine, if by "disabling UAC" you mean what you can do in the control panel. What actual problem symptoms are you trying to address?


Thanks for the response. I've found that you can set the HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA key to 0 to disable UAC, but it requires a reboot.
The issue I have is that we have been unable to successfully load SQLExpress 2005 and connect the database for a non-admin user without UAC disabled. Any ideas?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The real question here is whether the attempt to load and connect to the database should be done with administrator privileges. If so, you should make sure that prerequisites are marked to require the privileges, and custom actions are sequenced deferred in system context in setups that require them. If you need CAs and cannot sequence them that way, you can sometimes work around it by setting the execution level of your setup.exe to Administrator, but this is at best a band-aid. (Of course in the real world, band-aids are sometimes a better business choice than the "ideal" solution.)

A setup should not be attempting to change something like UAC (if a company wants to change it, something like group policy should be used for that); instead a setup needs to work with UAC. The privilege-related failures one starts to see under UAC are not generally new problems, so fixing them fixes scenarios that were mishandled even on XP.
0 Kudos
pjowens
Level 4

We were having the same issue. What we ended up doing was setting a username and password in the setup parameters for the SQL 2005 Express prerequisite, using that username and password in our SQL Connection to run any scripts during installation, and setting the connection string in our application to use the same username and password.

Pretty basic, but it worked.
-Pat
0 Kudos