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.



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\"");


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:


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.

ok -- nevermind i guess. Apparently since I was opening the Net.exe the command doesnt need the "NET START" it just needs "START".....hmmm?

This article has been dead for over six months. Start a new discussion instead.