• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

password must not match current users windows password

i have created an application in vb.net it requires now i want to protect it in a way that the password user selects for the application should not match the current users password....how can i do this....
0
neutrongenious
Asked:
neutrongenious
  • 3
  • 2
1 Solution
 
gopinathdeepakCommented:
well..at the time of password selection u can compare the value entered with the current entry in the database/ini file/registry or whatever storage place u have chosen for the password and if they are same u can pop up a dialog that says that the password chosen is invalid..choose another one..

something on those lines

0
 
neutrongeniousAuthor Commented:
gopinathdeepak look what you are saying if it explains you some thing then expalin it agian.....
0
 
gopinathdeepakCommented:
hmm..it looked pretty clear to me....

anyway...here it is again..

Assuming that u have the currently used password in the registry...
you can read the value from the registry, and compare it with the value that is entered by the user....if it matches, use a message box to show a warning that the "Password selected is invalid."

this is accordiing to what i understood of the question....if this is not what u wanted, u might want to clarify the question a little...

cheers.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
neutrongeniousAuthor Commented:
hmmmmmm!
nop! thats not what i want i don't know the user password only user enters a password and i will have to compare it with windows......
0
 
fazalsCommented:
take a look at this api this will provide you with the required help....

    Private Declare Auto Function LogonUser Lib "advapi32.dll" (ByVal lpszUsername As [String], _
       ByVal lpszDomain As [String], ByVal lpszPassword As [String], _
       ByVal dwLogonType As Integer, ByVal dwLogonProvider As Integer, _
       ByRef phToken As IntPtr) As Boolean
0
 
neutrongeniousAuthor Commented:
thanks it works great..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now