Hello,
I know that I have a problem with the wshshell line, because the program does not create the text file. so what I'm I missing here.
Code:
Dim WSHShell ' declare the object variable
Dim Message1
Dim Message2
Dim Title1
Dim result1
Dim result2
Message1 = "Variable A"
Message2 = "Variable B"
Title = "SMTP Utility"
Text1 = "Operation has been canceled!"
Text2 = "I got the input:" + vbCRLF
Set WSHShell = WScript.CreateObject("WScript.Shell")
result1 = InputBox(Message1,Title,"Born", 100, 100)
result2 = InputBox(Message2,Title,"Born", 100, 100)
If result1 = "" Then
WScript.Echo Text1
Else
WScript.Echo Text2 + result1
WScript.Echo result1
WScript.Echo result2
WSHShell.Run strPath & "smtpdiag.exe" & result1 & result2 & > smtpdiagTest.txt, 1, TRUE)
End If
WScript.Quit()
Thanks,
Mike
I know that I have a problem with the wshshell line, because the program does not create the text file. so what I'm I missing here.
Code:
Dim WSHShell ' declare the object variable
Dim Message1
Dim Message2
Dim Title1
Dim result1
Dim result2
Message1 = "Variable A"
Message2 = "Variable B"
Title = "SMTP Utility"
Text1 = "Operation has been canceled!"
Text2 = "I got the input:" + vbCRLF
Set WSHShell = WScript.CreateObject("WScript.Shell")
result1 = InputBox(Message1,Title,"Born", 100, 100)
result2 = InputBox(Message2,Title,"Born", 100, 100)
If result1 = "" Then
WScript.Echo Text1
Else
WScript.Echo Text2 + result1
WScript.Echo result1
WScript.Echo result2
WSHShell.Run strPath & "smtpdiag.exe" & result1 & result2 & > smtpdiagTest.txt, 1, TRUE)
End If
WScript.Quit()
Thanks,
Mike