473,395 Members | 1,815 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,395 software developers and data experts.

How to execute a dos commend in C#?

How to execute a dos commend in C#?
Many thanks for your replying.

private void button1_Click(object sender, EventArgs e)
{
//code here please
}
Jul 24 '07 #1
4 2228
Hi,
Below link should help you:
http://geekswithblogs.net/ram/archiv.../23/66732.aspx
--
Hope this answers your question.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"vincent" wrote:
How to execute a dos commend in C#?
Many thanks for your replying.

private void button1_Click(object sender, EventArgs e)
{
//code here please
}

Jul 24 '07 #2
It is very helpful.
Thank you very much.

"Manish Bafna" wrote:
Hi,
Below link should help you:
http://geekswithblogs.net/ram/archiv.../23/66732.aspx
--
Hope this answers your question.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

"vincent" wrote:
How to execute a dos commend in C#?
Many thanks for your replying.

private void button1_Click(object sender, EventArgs e)
{
//code here please
}
Jul 24 '07 #3
"vincent" <vi*****@discussions.microsoft.comwrote in message
news:18**********************************@microsof t.com...
How to execute a dos commend in C#?
Many thanks for your replying.
The easiest way is with PowerShell:

private void button1_Click(object sender, EventArgs e)
{
using (RunspaceInvoke ri = new RunspaceInvoke())
{
Collection<PSObjectresults =
ri.Invoke("the-command-you-want-to-execute");
}
}
Jul 24 '07 #4
Wow! It is beautiful.
Thank you very much.

"John Vottero" wrote:
"vincent" <vi*****@discussions.microsoft.comwrote in message
news:18**********************************@microsof t.com...
How to execute a dos commend in C#?
Many thanks for your replying.

The easiest way is with PowerShell:

private void button1_Click(object sender, EventArgs e)
{
using (RunspaceInvoke ri = new RunspaceInvoke())
{
Collection<PSObjectresults =
ri.Invoke("the-command-you-want-to-execute");
}
}

Jul 25 '07 #5

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

Similar topics

2
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works,...
2
by: Matt | last post by:
I want to exexute stored procedure in ASP, but it has error "Microsoft VBScript compilation (0x800A0401) Expected end of statement" on line (1). The stored procedure "sp_emp" contain "select *...
7
by: William Gill | last post by:
I have been trying to pass parameters as indicated in the api. when I use: sql= 'select * from %s where cusid = %s ' % name,recID) Cursor.execute(sql) it works fine, but when I try : sql=...
9
by: PyPK | last post by:
Hi if I have a function called tmp=0 def execute(): tmp = tmp+1 return tmp also I have def func1(): execute() ....
5
by: Gustavo Randich | last post by:
Hello, I'm writing an automatic SQL parser and translator from Informix to DB2. Now I'm faced with one of the most difficult things to translate, the "foreach execute procedure" functionality...
2
by: Norman Fritag | last post by:
Hi there The below code executes some queries. As newbie I was wondering weather you are better of using connection execute or command execute to execute queries? I am asking as...
2
by: Dune | last post by:
I'm trying to execute an aspx page by calling Server.Execute. The aspx page I'm trying to execute is in a different web app from the aspx page containing the Server.Execute statement. A slightly...
2
by: vincent90152900 | last post by:
How to execute a dos commend in C#? Many thanks for your replying. private void button1_Click(object sender, EventArgs e) { //code here please }
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.