473,395 Members | 1,639 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.

C#.net equivalent of system()

Hi,

I'm looking for a C#.net equivalent of the c command "system()"?

Sample Code for reference

C++ code

long nRetVal = system("Login.exe -u userName -p Password");
if(nRetVal == 0)
return true;

C# Code

??

Thanks in Advance.

Regards,
- Amit Gupta

Dec 5 '06 #1
2 1559
using (Process proc = Process.Start("Login.exe", "-u userName -p
Password")) {
proc.WaitForExit();
if(proc.ExitCode == 0) return true;
}

Marc
Dec 5 '06 #2
Take a look at System.Diagnostics.Process
"Amit" <am**********@gmail.comwrote in message
news:11**********************@j72g2000cwa.googlegr oups.com...
Hi,

I'm looking for a C#.net equivalent of the c command "system()"?

Sample Code for reference

C++ code

long nRetVal = system("Login.exe -u userName -p Password");
if(nRetVal == 0)
return true;

C# Code

??

Thanks in Advance.

Regards,
- Amit Gupta

Dec 5 '06 #3

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

Similar topics

4
by: Gregory W. Ernest | last post by:
I am new to Java programming and I was wondering if anyone can tell me the java equivalent to a cin>>...; that is normally used in c++. I want to get user input and automatically assign it to a...
14
by: John | last post by:
Is there an equivalent of COM on Linux that I can get through Python. My need is to have some sort of language independent component framework. I can think of CORBA but I have to have a server...
4
by: isee | last post by:
I want to send xml to some site and get response (also XML). I am using vb.net,but I don't want to install MSXML 4.0 .
4
by: Hai Nguyen | last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using panel to test myself. I tried to use these code below, which is written in VB, and to transform them to c sharp but I got...
7
by: TJS | last post by:
is there a server side equivalent to this ?? Inherits System.Windows.Forms.Button
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
23
by: EOS | last post by:
Hi, As the title indicated, does anyone know the equivalent of GetTickCount() function in C/C++ for C#? The function is supposed to return time elapsed since the computer/device is booted in...
4
by: pcnerd | last post by:
I've been playing with "classic" VB since version 3. I have VB6 Learning Edition. Recently, I wanted to try VB.NET. I got a beginner's book with a CD with the software & installed it. There are...
9
by: AzenAlex | last post by:
Does anyone know what the C# equivalent of System.currentTimeMillis() would be?
5
by: =?Utf-8?B?VG9tYXM=?= | last post by:
Hello, Somebody knows which is the equivalent one in C++/CLI ? HINSTANCE ShellExecute(HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...
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...

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.