Let's say, for simplicity sake, I have a little VB program (named TEST.EXE) that has but one module in it:

Public Sub Main()

Dim myName as String
myName = "MyTestName"

'some code needs to go here - but what?

End Sub


This program is compiled into an .EXE and will be executed via the command line - not via the Windows interface.

I want the program to return MyTestName to the command line when the program is executed. So, a sample session would look like:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\> TEST.EXE
MyTestName

C:\>

Essentially I need to write to the standard output device when the program is run. This is cake in C or Java, but I'm clueless as to how it's done in VB.

Anybody?

I suppose I could write to some dummy disk file then have the shell script read it...