Hi,
Does anyone have any pointers on how to grab the text output of an exe.
Scenario is that I have access to run an exe which when I run in my cmd window will give me my name. If someone else runs it from their machine it will display their name, seems perfect for putting into vba queries that pull info from databses and would bypass the need to login.
I'm guessing that Shell would be involved. I've been barking up
[pre]
[/pre]
The MsgBox myVal comes back with not the expected result but a number which differs each time I run it. I figure this to be the unique task ID mentioned on the msdn site.
I don't have access to the inside of myfile.exe.
Any pointers would be appreciated.
Does anyone have any pointers on how to grab the text output of an exe.
Scenario is that I have access to run an exe which when I run in my cmd window will give me my name. If someone else runs it from their machine it will display their name, seems perfect for putting into vba queries that pull info from databses and would bypass the need to login.
I'm guessing that Shell would be involved. I've been barking up
[pre]
Code:
Sub Test()
myVal = Shell("C:myfile.exe")
MsgBox myVal
End Sub
The MsgBox myVal comes back with not the expected result but a number which differs each time I run it. I figure this to be the unique task ID mentioned on the msdn site.
I don't have access to the inside of myfile.exe.
Any pointers would be appreciated.