| | |
C# Command Line Application
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2005
Posts: 4
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Jul 2005
Posts: 4
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- Command Line Arguments (C#)
- C command-line I/O question (C++)
- Command-line argument syntax (C++)
- Windows Main and Command Line Parameters (C)
- Help! How to make a csh receive argvs from command line? (*nix Software)
- Three New Command-Line Tools (Windows tips 'n' tweaks)
- command line (OS X)
Other Threads in the C# Forum
- Previous Thread: Help....C# Project
- Next Thread: copying file/folder to a net drive
| Thread Tools | Search this Thread |
.net access algorithm animation array barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom customactiondata database datagrid datagridview dataset datastructure date/time datetime datetimepicker degrees development dll draganddrop drawing encryption enum event excel file filename files form format forms function gdi+ gis gtk hash image index input install java label list listbox mandelbrot math mouseclick mysql operator outlook2003 path photoshop picturebox pixelinversion pixelminversion post programming radians regex remoting richtextbox server sleep snooze socket sql statistics stream string table tables tcp text textbox thread time timer update usercontrol usercontrols validation visualstudio webbrowser webcam wia windows winforms wpf xml





