Hi, if you save this code as a HTA file, it should run the program for you after you enter the username and password.
Regards,
Rob.
<html>
<head>
<title>MAS-90 Authentication</title>
<HTA:APPLICATION
APPLICATIONNAME="MAS-90 Authentication"
BORDER="thin"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
>
<script language="VBScript">
Dim strHTAPath
Sub Window_onLoad
intWidth = 600
intHeight = 480
Me.ResizeTo intWidth, intHeight
Me.MoveTo ((Screen.Width / 2) - (intWidth / 2)),((Screen.Height / 2) - (intHeight / 2))
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Mid(document.location, 6, 3) = "///" Then
strHTAPath = Mid(Replace(Replace(document.location, "%20", " "), "/", "\"), 9)
Else
strHTAPath = Mid(Replace(Replace(document.location, "%20", " "), "/", "\"), 6)
End If
txt_username.Focus
End Sub
Sub Run_Program
If txt_username.Value = "" Then
MsgBox "Please enter a user name."
txt_username.Focus
ElseIf txt_password.Value = "" Then
MsgBox "Please enter a password."
txt_password.Focus
Else
Set objShell = CreateObject("WScript.Shell")
PVX_KEY = "HKLM\Software\ODBC\ODBC.INI\SOTAMAS90\Directory"
pvx = objShell.RegRead(PVX_KEY)
prog = pvx & "\home\pvxwin32.exe ..\soa\startup.m4p -arg DIRECT UION " & txt_username.Value & " " & txt_password.Value & " SKT VIWI00"
MsgBox "Running: " & VbCrLf & prog
objShell.Run prog, 1, True
End If
End Sub
</script>
</head>
<body style="background-color:#B0C4DE">
<table width='90%' height='100%' align='center' border='0'>
<tr>
<td align="center" style="font-family: arial; font-size: 24px; font-weight: bold;">
MAS-90 Authentication
</td>
</tr>
<tr>
<td align='center' style="font-family: arial; font-size: 16px; font-weight: bold;">
Enter username: <input type="text" maxlength="30" size="40" id="txt_username" name="txt_username" style="font-size: 14px;"><BR><BR>
Enter password: <input type="password" maxlength="30" size="40" id="txt_password" name="txt_password" style="font-size: 14px;"><BR>
<br>Note: Username must be DOMAIN\UserName
</td>
</tr>
<tr>
<td align='center'>
<input type="button" value="Go!" name="btn_submit" onClick="vbs:Run_Program" style="font-size: 16px;"><br><br>
</td>
</tr>
</table>
</body>
</html>
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70:





by: kai_blueskyPosted on 2009-08-19 at 18:00:09ID: 25138634
Here may be workaround. Call up a Web page and use the HTML password box to mask passwords. echnet/scr iptcenter/ resources/ qanda/feb0 5/hey0204. mspx
http://www.microsoft.com/t