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.
31 lines
883 B
Plaintext
31 lines
883 B
Plaintext
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
|