I’m using dpint.exe in my driver package. I’m facing the below mentioned scenario’s in Windows 7 64 bit os.
When UAC Enabled, It works as expected in admin mode( user with admin
privileges ) , standard user mode and in guest mode. ( i.e., promts a
window asking for admin password in standard user mode and guest mode
).When UAC is disabled, In Admin mode ( user with admin privileges ) it
“never” shows any windows saying “Do you want to allow the following
program to make changes to this computer”. ( this behaviour also an
expected one!! ) “BUT IN STANDARD USER MODE WHEN I CLICK THE DRIVER
INSTALLER EXECUTABLE ( Which calls dpinst.exe internally ) THE SYSTEM
HANGS AND WHEN I TRY TO RESTART IT SAYS A BACKGROUND PROCESS IS
RUNNING AND DO YOU WANT TO FORCE RESTART. In guest login mode also a
popup occurs showing “Setup.exe stopped working”. If the above problem
is because of “Dpinst.exe needs an admin privilege” why does windows
didnt show a warning message instead gets hanged??
And how to tell the user that change to administrator to continue with installation..
You can “tell the user that change to administrator to continue” only by detecting the credentials the user is running under. When UAC is disabled, the installation package must take care of this task and detect whether Administrative credentials will be needed to install the application. This information is often configured in the Manifest of the application to install.
A really really good overview of UAC and Manifest explains this