Verifying user's password

During my install I prompt the user for their username and password. I then try to verify this, but it requires elevated priviledges. The documentation says to add the msidbCustomActionTypeNoImpersonate flag to custom actions, but this flag only works on deferred actions.

Does anyone know of another way that I can verify the users password?

Thanks,

Anthony

[531 byte] By [AnthonyHunter] at [2007-12-27]
# 1

Why do you need to?

(The reason I ask is because >90% of the time when this question is asked, there is a better solution to the underlying issue than prompting for and handling passwords.)

AaronMargosis-MSFT at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Application Compatibility for Windows Vista...
# 2

I need to do this because I'm installing services that require a network username.

Anthony

AnthonyHunter at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Application Compatibility for Windows Vista...
# 3

Would the NetworkService account meet your requirements? (NetworkService authenticates on the network as the computer account.)

Several issues come to mind with using the interactive user's account in the service context:

  • Having to update the service config when the user's password changes (again requiring elevated permissions)
  • Having the service authenticate as the "wrong user" if another user logs on to the computer (service will continue to run as the original user)
  • Having to grant the user account the LogOnAsAService right.
  • Storing the user's domain password in the LSA Secrets.
AaronMargosis-MSFT at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Application Compatibility for Windows Vista...
# 4

The could potentially work, but I will have to do some testing with the QA group.

Thanks,

Anthony

AnthonyHunter at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Application Compatibility for Windows Vista...
# 5
Is your app designed for a domain or a workgroup environment?
AaronMargosis-MSFT at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Application Compatibility for Windows Vista...
# 6

It is designed for a domain environment.

Anthony

AnthonyHunter at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Application Compatibility for Windows Vista...

Software Development for Windows Vista

Site Classified