C# Command Line Application

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2005
Posts: 4
Reputation: drp is an unknown quantity at this point 
Solved Threads: 0
drp drp is offline Offline
Newbie Poster

C# Command Line Application

 
0
  #1
Jul 7th, 2005
Hi, I've made a web application, and now I want to be able to distribute it with a copy of MSDE SP4. MSDE has to be installed via command line, and the web application takes a certain database setup. I've got all the scripts and commands ready to install the new copy of MSDE, create the database, tables and the stored procedures. I want to make it automated so anyone can install this setup, but i have no idea where to begin.

I've been playing around with System.Diagnostics.Process class and I can open the command line, but i have no idea how to place commands in it. I really don't know where to go from there. Am i even on the right track?

Any point in the right direction would be greatly appreciated.

drp
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 4
Reputation: drp is an unknown quantity at this point 
Solved Threads: 0
drp drp is offline Offline
Newbie Poster

Re: C# Command Line Application

 
0
  #2
Jul 7th, 2005
UPDATE:

Ok I've got the command to run the Setup.exe file. It installs MSDE fine --> now I have to (without restarting the computer) start the MSDE service. Here's what I have:

System.Diagnostics.Process Process3;
Process3 = new System.Diagnostics.Process();

cmd = "C:\\WINDOWS\\system32\\Net.exe";

Process3 = System.Diagnostics.Process.Start(cmd, "NET START \"SQLAgent$NETSDK\"");

Process3.WaitForExit();
Process3.Close();

when this part of the code runs it quickly starts the net.exe --> then closes
Ive been able to capture part of it with print screen and it says:
"The syntax of this command is:

NET:"

I know the syntax is: NET START "SQLAgent$NETSDK"

Ive printed out my string variable that holds the parameter and it comes out just like its supposed to.

Has anyone ever encountered this? Or does anyone have an idea of what might be going wrong?

Thanks for your time.
drp
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 4
Reputation: drp is an unknown quantity at this point 
Solved Threads: 0
drp drp is offline Offline
Newbie Poster

Re: C# Command Line Application

 
0
  #3
Jul 7th, 2005
ok -- nevermind i guess. Apparently since I was opening the Net.exe the command doesnt need the "NET START" it just needs "START".....hmmm?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC