Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Opening Command Prompt

$
0
0
Hey guys, I am trying to open command prompt and I will then like to insert some commands. For now I am trying to open it using the Shell sub routine and AppActivate.

I keep getting this error:

ArgumentException was unhandled
process '2276' was not found

And the error points to the line where I attempt calling the AppActivate function.

Here is my code which is on a button:

Dim cmdID As Integer

cmdID = Shell("CMD.EXE", AppWinStyle.NormalFocus)

AppActivate(cmdID) 'this is the line giving me the error

Thank you for any help!

Viewing all articles
Browse latest Browse all 27554

Trending Articles