473,543 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
System.Diagnost ics.Process.Sta rt("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 5097
kimiraikkonen <ki************ *@gmail.comwrot e in
news:11******** **************@ q75g2000hsh.goo glegroups.com:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
System.Diagnost ics.Process.Sta rt("cmd.exe")
End Sub
System.Diagnost ics.Process.Sta rt(textbox1.tex t)

?
Jul 24 '07 #2
On Jul 24, 10:42 pm, Spam Catcher <spamhoney...@r ogers.comwrote:
kimiraikkonen <kimiraikkone.. .@gmail.comwrot e innews:11****** *************** *@q75g2000hsh.g ooglegroups.com :
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
System.Diagnost ics.Process.Sta rt("cmd.exe")
End Sub

System.Diagnost ics.Process.Sta rt(textbox1.tex t)

?
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
3134
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 to release it in a package (with all needed to run) so i use (the wonderful) py2exe to build it ... it works like a charm ... nothing to say
3
3154
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 server called DLLHOST.EXE has taken all the memory, and the mySQL goes off line. I close all of the record sets, and all of the Text files I...
10
7423
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 = Server.CreateObject("WScript.Shell") objWshell.Run "%COMSPEC% /C kill iexplore.exe", 0, TRUE VILMAR BRAZIL
0
352
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 version, I need to download the file from the server to the client. I wonder what is the best way to download a EXE without executing it when it arrives...
2
32276
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 exciting but I assume I am seriously short of knowledge, so here I am - asking for help. My current situation is that I can define schemas that will...
5
1830
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 controls. Andrés Cadavid Gómez in news:F6C9754F-1EF5-4BA1-8B26-6FA03619DB12@microsoft.com pointed me to the site where I could get it I followed the...
3
5010
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 .exe application by clicking a button and want the .exe to run on the server. I have read in groups that it is not possible and also have heard...
0
8979
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 own VM. They are started in separate DOS command windows via a visual basic script. If I look in Windows Task Manager, I see XX number of "java.exe"...
4
7911
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 c:\windows\system32\cmd.exe" Does anyone know how do I get rid of this message? thanks meir
0
7347
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7733
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7344
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7684
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3388
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1814
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
633
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.