Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBS Script

Status
Not open for further replies.

Ragol1

Programmer
Oct 25, 2001
315
US
Hello,

I had a Visual Basic Script converted to vbs for me and one part of it is not working.

This piece checks for passwords in a SQL 2000 MSDE data base and if it is either NOT clear text of Blank then it should tell you that it is either encrypted or blank and ask you to enter a default password for all of the users.

The Echo is not working either.

'WScript.Echo = "Checking password encryption status..."

sqlQuery = "SELECT * FROM Settings;"
Set objRS = objConn.Execute(sqlQuery)

strPassword = ""

If objRS("ClearTextPasswords") = 0 Then
Do Until strPassword <> ""
strPassword = InputBox("What password would you like to assign to users?", "Passwords are encrypted...")

If strPassword = "" Then
MsgBox "You can not use a blank password!", vbCritical
End If
Loop
End If

'WScript.Echo = "Scanning database...
 
Don't use an = in calls to WScript.Echo.

'WScript.Echo "Checking password encryption status..."

I don't understand what this line is supposed to be doing:

If objRS("ClearTextPasswords") = 0 Then

What errors are you getting?

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
The Echo now works, Thanks.

This code is doing a conversion from a database to a registry file, it is supposed to read a table in the DB of users and passwords, if the password is either BLANK or Encrypted (NOT CLEAR TEXT) then it should prompt you to put in a default password. If it is Clear text then it writes it to the DB.

Thanks

If objRS("ClearTextPasswords") = 0 Then
Do Until strPassword <> ""
strPassword = InputBox("What password would you like to assign to users?", "Passwords are encrypted...")

If strPassword = "" Then
MsgBox "You can not use a blank password!", vbCritical
End If
Loop
End If
 
I don't know that you can determine if it is encrypted text and shouldn't all passwords be encrypted?

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
lol

The passwords were Encrypted but we changed them to clear text just for this migration.

This is a script that converts from one mail system to another and it needs to read the password as clear text. Once it reads it and plugs it into the registry it than encrypts it back.

This code works with VB Studio 5, this was an EXE that was converted to VBS so the code works it just needs to be changed somehow to work with VBS.

Thanks
 
What error do you get?

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
I do not, it just does not work, its like it skips it.

Thanks
 
At any point in the script did you put the line:

On Error Resume Next

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top