You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB
Plaintext

Option Explicit
Dim strUsername,strPassword,wshshell,fso,strCommandLine
Dim strSystemFolder,strWinFolder,strTempFolder,strPath,Dlg
set wshshell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
strPath = GetCurrentPath()
strSystemFolder = fso.GetSpecialFolder(1) & "\"
strWinFolder = fso.GetSpecialFolder(0) & "\"
strTempFolder = fso.GetSpecialFolder(2) & "\"
Set Dlg = CreateObject("Install.InputDlg")
Dlg.Caption = "Username"
Call Dlg.SetLine(0, "Please enter the username!")
Dlg.Show
strUsername = Dlg.InputLine
Set Dlg = CreateObject("Install.InputDlg")
Dlg.Caption = "Password"
Call Dlg.SetLine(0, "Please enter the password!")
Call Dlg.SetPasswordChar("*")
Dlg.Show
strPassword = Dlg.InputLine
strCommandLine = GetCurrentPath() & "vbrunas.vbs " & strUsername & " " & strPassword & _
" """ & strSystemFolder & "wscript.exe " & _
GetCurrentPath() & "Opendoors.vbs " & strUsername & " " & strPassword & """"
Call wshshell.run(strCommandLine)
Function GetCurrentPath()
Dim l_strScriptName
Dim l_strTemp
l_strScriptName = WScript.ScriptFullName
l_strTemp = WScript.ScriptName
GetCurrentPath = Left(l_strScriptName, Len(l_strScriptName) - Len(l_strTemp))
End Function