Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Validating a UserId/Pass combo?


5 replies to this topic

Scott Williams

Scott Williams
  • Members
  • 38 posts

Posted 27 February 2002 - 19:05

I'm already capturing DOMAIN\UserId and Password information in a dialog so that I can set the identity of some COM+ components later in an install.  However, if this is invalid (wrong password, etc) it fails.  I have looked into creating a custom action DLL that calls the LogonUser API, but the Windows Installer service doesn't seem to posses the proper rights to make this API call.  Is there another way to accomplish this task?  MSI specific answers please, as I'm not using IS.


Irina

Irina
  • Members
  • 227 posts

Posted 27 February 2002 - 21:20

Hi,
1. I have a dialog with the customer information and set by it two properties ACCOUNT and PASSWORD.
2. I pass these properties to the standard Windows Installer dll to validate this information after clicking the Next button. This is a C++ code routine which validates the customer information and sets a new property VALIDATE as "YES" or "NO".
3. I use the VALIDATE property to allow or don't continue the installation.
Send me a message if this is fine for you and I will send you this code by email.

Scott Williams

Scott Williams
  • Members
  • 38 posts

Posted 27 February 2002 - 21:43

Irina, this is basically exactly what I'm attempting to do.  I just discovered that my call to the LogonUser API had an incorrect parameter for my particular user id, and that is why it was failing, but I still need to get that implemented off of the Next button.

So, you are saying that the MSI.DLL has a routine in it for validating a UserId/Password?


Opps, just noticed that my email isn't shown from my profile. :)

SWilliams@mrisystem.com

(Edited by Scott Williams at 3:44 pm on Feb. 27, 2002)


Irina

Irina
  • Members
  • 227 posts

Posted 27 February 2002 - 21:57

Scott, I mean I have created my own dll which has a routine to validate account/password information.
This routine is declared as
UINT_stdcall  MyRoutine(MSIHANDLE hInstall).
I created a custom action (MyCustomAction) in my project to call this routine with Action Type (Custom action wizard):
Type:   Call a function in a Windows Installer dynamic-link library
Location: Stored in the Binary table

I set for the Next button in my dialog events as:
Event:              DoAction
Argument:      MyCustomAction
Condition:      1

and

Event:            NewDialog
Argument:    MyNextDialog
Condition:    VALIDATE="YES"

Hope it  helps.


Scott Williams

Scott Williams
  • Members
  • 38 posts

Posted 27 February 2002 - 23:16

Ahh, OK, I missunderstood there.  That is what I'm attempting to do.  Don't suppose you would mind sending me your custom action DLL source would you?  Are you using the LogonUser API, or something different?

If you don't want to, that is fine.


hteichert

hteichert
  • Members
  • 158 posts

Posted 28 February 2002 - 13:18

Ok, I didn't say anything in this thread 'til now. But I would also be interested in this CA DLL source. I believe that it's not necessary to reinvent the wheel again and again.
I have to install some services running in an own account (not localservice) where the account may be selected by the user, so checking would be good.
Would be nice if you could send me the code, too. Thanks.

Holger