Open the command line and type in something and hit the enter button with coding?:D
Printable View
Open the command line and type in something and hit the enter button with coding?:D
Yes :D
Use process obj , set its file name property , set arguments . Start it .
I'm kinda lost with the Process Object and Argument Could you give me an example of what you mean?
thanks alot
Something like this but it doesn't work for some reason . I mean it doesn't send the arguments . I don't know what I'm missing here . :confused:
VB Code:
Dim proc As New Process proc.StartInfo.FileName = "CMD.EXE" proc.StartInfo.Arguments = "cd.." proc.Start()
This works fine . It uses the string assigned to arguments property .
VB Code:
Dim proc As New Process proc.StartInfo.FileName = "IEXPLORE.EXE" proc.StartInfo.Arguments = "www.blah.com" proc.Start()
can you do that in a dos based program though?
Where you have to send 3 arguments right after another?
You mean .bat files ? you don't want to write that in VB.NET ??Quote:
Originally posted by Masta
can you do that in a dos based program though?
Where you have to send 3 arguments right after another?
ok I need to take and send 3 commands in dos to a program to change something - Will it be easier with a bat file or .net code?
It depends on the thing you are implementing ??Quote:
Originally posted by Masta
ok I need to take and send 3 commands in dos to a program to change something - Will it be easier with a bat file or .net code?
well I am trying to change my Static IP of a Network without all the hassle of going to the Network connection.. and changing it that way
thats why I was trying to make a Program to go and do it for me....
OK , if it's DOS Command it's easier to use .bat files . It'll execute the command and closes the DOS window . Can you send me that command ?I've tried this but it gives error about DHCP . I think it's not applicable when getting online .
IPCONFIG/renew
you have to open (netsh) then type in (interface) hit enter then type in (ip) hit enter then type in (set address "connection" static IP address Subnet Mask) hit enter :D :D
thank you so so much
I really forgot how to write a working batch file . That was in Win98 days (3 years ago) . Anyhow , see the links if they can offer better help than me .http://www.robvanderwoude.com/index.html . I made a batch file and can execute netsh but I don't know how to get the next command . simulate enter key press .
hello,
I need to send parameter to command prompt how can i do that ,i have tried
your code its opening command prompt but the command is not getting executed any suggestions...
1. Dim proc As New Process
2. proc.StartInfo.FileName = "cmd.exe"
3. proc.StartInfo.Arguments = "d:"
4. proc.Start()