Dim strResult,Fnct,fso,wshshell set wshshell = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Set Fnct = CreateObject("Install.Functions") 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 = "vbrunas.vbs " & strUsername & " " & strPassword & _ " " & GetTWinCATFolder() & ("\Io\TCatSysManager.exe") Call wshshell.Run(strCommandLine) Function GetTWinCATFolder Dim l_strDir l_strDir = wshshell.ExpandEnvironmentStrings("%TWINCATDIR%") If l_strDir = "%TWINCATDIR%" Then l_strDir = "C:\TWinCAT" GetTWinCATFolder = l_strDir End Function