Click here to Skip to main content
15,120,268 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use VB 2010. I would like to send command line arguments from my VB app, eg creating folders or copying files through cmd. The command window should be hidden. I would also like to read the title of the Command Prompt window. Also I would like to know when command window has finished processing.
Posted
Comments
bbirajdar 20-Dec-12 3:42am
   
What do you expect from us ?

1 solution

Hi,

Create a system function:
VB
<System.Runtime.InteropServices.DllImport("msvcrt.dll")> _
Public Shared Function system(command As String) As Integer
End Function

Now, you can call this function for a command:
VB
system("processToStart.exe"); // for example, start a process

This function will not create a cmd window.

Hope this helps.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900