Code: Select all
IF Len(Session.Property("PASS_FIELD"))<2 Then
Session.Property("PASS_IS_GOOD") = "0"
Else
Session.Property("PASS_IS_GOOD") = "1"
End If
Code: Select all
MsgBox "Some info that pass is not good", vbOKOnly + vbSystemModal + vbExclamation, "Warrning"
Code: Select all
Function ValidatePassword(user, password)
Dim network, fileSystemObject, shell, cmdLine
Dim computerName, pathToPSExec, result
Set network = CreateObject("WScript.Network")
computerName = network.ComputerName
Set fileSystemObject = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
pathToPSExec = fileSystemObject.GetFile("psexec.exe").ShortPath
cmdLine = pathToPSExec & " -accepteula -e -u " & user & " -p " & password & " \\" & computerName & " cmd /c"
result = shell.Run(cmdLine, 0, True)
If result = 1326 Then
ValidatePassword = False
Else
ValidatePassword = True
End If
End Function
ValidatePassword ".\administrator", "123456"
FOLLOW US
Get the latest news in Application Packaging