473,324 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Textbox + Button ? launching command from "cmd.exe" How?

Hi experts,
I just want to ask a simple procedure of my simple form. My form has a
input textbox and a button.

I want this if you can help me:

Application user types a command prompt command like "dir" into
"textbox", then after clicking "button", command prompt(cmd) should
run with the prompt that user has written already into "textbox" .

I managed to run command prompt with this code, but the problem is how
to use command prompt with textbox+button?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("cmd.exe")
End Sub

For example user enters "dir" into textbox, then clicks "button" after
that command prompt is opened and lists file of the current directory?

How to implement this?

Also if you explain how to use command with parameters like "dir /a"
in VB.NET?

Very thanks.

Jul 24 '07 #1
3 5078
kimiraikkonen <ki*************@gmail.comwrote in
news:11**********************@q75g2000hsh.googlegr oups.com:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("cmd.exe")
End Sub
System.Diagnostics.Process.Start(textbox1.text)

?
Jul 24 '07 #2
On Jul 24, 10:42 pm, Spam Catcher <spamhoney...@rogers.comwrote:
kimiraikkonen <kimiraikkone...@gmail.comwrote innews:11**********************@q75g2000hsh.google groups.com:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("cmd.exe")
End Sub

System.Diagnostics.Process.Start(textbox1.text)

?
What? Why is NOT my first message displayed? Sth weird on the
groups...

I just wanted to ask how to launch cmd (command prompt) with "dir"
command also with parameters...

Jul 24 '07 #3
No help?

Jul 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: marco | last post by:
Hi, first of all ; sorry for my poor english ; i'm french ... and i hope you can understand below I use python (and wxpython) on a win32 platform, to build a simple "home theater pc". I want...
3
by: Graham Mattingley | last post by:
Hello Group, I have had an issue on my server for a long time and what ever I have tryed I just cant fix it. I run mySQL and IIS, and my server will crash every few days because a file on the...
10
by: Vilmar Brazão de Oliveira | last post by:
HI people, what is wrong in the code bellow to kill iexplore.exe process after processing my page?? '»»Before comes routines to access data base and to send email. Set objWshell =...
0
by: uballing | last post by:
I am writing a "Windows Update" type application where via Web Services the client checks with the Server if he needs to download a newer version of a set of DLLs and EXE. If there is a newer...
2
by: Marek | last post by:
Actually, the very first question I should ask is "does it make sense at all?". For 2 days I've been trying to generate C# classes using XML schema and xsd.exe tool. So far the results are not...
5
by: Richard Lionheart | last post by:
How do I make the changes to environment variables made by vsvars32.bat persistent? I have tried to build Microsoft.Web.UI.WebControls.dll in a effort to study some tutorials about web...
3
by: bwalke | last post by:
I was wondering how the Process.Start() command can be used in a VB.NET Web Application. I have used this command in a Windows Application before successfully. I want the client side to envoke the...
0
by: Fran Maurais | last post by:
Is there a simple way for a Java application to display/log the Windows PID that has been assigned to it? I'm running on both Win2K and WinXP. I have several Java apps, which all run in their...
4
by: mshoham | last post by:
visual studio creates a temporary batch file during build and fails to run the file using cmd.exe. I'm getting the following error message on te output window: "error executing...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.