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