|
-
Sep 7th, 2003, 09:24 AM
#1
Thread Starter
New Member
Is there a way to do this?
Open the command line and type in something and hit the enter button with coding?
-
Sep 7th, 2003, 12:59 PM
#2
-
Sep 7th, 2003, 01:22 PM
#3
Sleep mode
Use process obj , set its file name property , set arguments . Start it .
-
Sep 8th, 2003, 12:59 PM
#4
Thread Starter
New Member
I'm kinda lost with the Process Object and Argument Could you give me an example of what you mean?
thanks alot
-
Sep 8th, 2003, 01:05 PM
#5
Sleep mode
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 . 
VB Code:
Dim proc As New Process
proc.StartInfo.FileName = "CMD.EXE"
proc.StartInfo.Arguments = "cd.."
proc.Start()
-
Sep 8th, 2003, 01:09 PM
#6
Sleep mode
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()
-
Sep 8th, 2003, 01:13 PM
#7
Thread Starter
New Member
can you do that in a dos based program though?
Where you have to send 3 arguments right after another?
-
Sep 8th, 2003, 01:17 PM
#8
Sleep mode
Originally posted by Masta
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 ??
-
Sep 8th, 2003, 01:21 PM
#9
Thread Starter
New Member
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?
-
Sep 8th, 2003, 01:55 PM
#10
Sleep mode
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?
It depends on the thing you are implementing ??
-
Sep 8th, 2003, 02:12 PM
#11
Thread Starter
New Member
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....
-
Sep 8th, 2003, 02:19 PM
#12
Sleep mode
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
-
Sep 8th, 2003, 02:22 PM
#13
Thread Starter
New Member
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
thank you so so much
-
Sep 8th, 2003, 03:30 PM
#14
Sleep mode
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 .
-
Oct 26th, 2008, 08:00 AM
#15
Junior Member
Re: Is there a way to do this?
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()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|