Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Problems with System.Diagnostics.Process class
Greetings.  I am trying to use the System.Diagnostics.Process class to
perform some actions through the Windows command line.  The applicable
code appears below.  The code builds the follow command fine, and will
open the command line in the proper working directory, but will not send
the follow-up command to the command line.

The code also catches no errors.

Any assistance would be greatly appreciated.

Thanks.

Joe

--------------
--   CODE   --
--------------

private void deleteButton_Click(object sender, System.EventArgs e)
{
try
{
sysProcess = new System.Diagnostics.Process();
sysProcess.StartInfo.FileName = "cmd.exe";
sysProcess.StartInfo.UseShellExecute = true;
sysProcess.StartInfo.WorkingDirectory = "C:\\Program Files\\Common
Files\\Microsoft Shared\\web server extensions\\60\\bin\\";
string strCmdLine;
string shortCab;
shortCab = cabName.Text.Substring(cabName.Text.LastIndexOf("\\")+1);
//Build follow-up command
strCmdLine = "stm.exe -o deletewppack -name " + shortCab;
Debug.Write("strCmdLine = " + strCmdLine);
sysProcess.StartInfo.Arguments = strCmdLine;
sysProcess.Start();
sysProcess.Close();
}
catch (Exception ex)
{
Debug.Write("Exception: " + ex);
}
}

Report this thread to moderator Post Follow-up to this message
Old Post
Joey Mack
11-30-04 01:56 AM


Re: Problems with System.Diagnostics.Process class
Looks like you're trying to build a GUI front end for stm.  Perhaps
this might interest you:

http://www.microsoft.com/sharepoint...etail.asp?a=443

Joel Martinez
http://www.onetug.org - Orlando .NET User Group
http://www.codecube.net - blog

Joey Mack <jwm68@sbcglobal.net> wrote in message news:<WTMqd.25862$Rf1.13522@newssvr19.news
.prodigy.com>...
> Greetings.  I am trying to use the System.Diagnostics.Process class to
> perform some actions through the Windows command line.  The applicable
> code appears below.  The code builds the follow command fine, and will
> open the command line in the proper working directory, but will not send
> the follow-up command to the command line.
>
> The code also catches no errors.
>
> Any assistance would be greatly appreciated.
>
> Thanks.
>
> Joe
>
> --------------
> --   CODE   --
> --------------
>
> private void deleteButton_Click(object sender, System.EventArgs e)
> {
> 	try
> 	{
> 		sysProcess = new System.Diagnostics.Process();
> 		sysProcess.StartInfo.FileName = "cmd.exe";
> 		sysProcess.StartInfo.UseShellExecute = true;
> 		sysProcess.StartInfo.WorkingDirectory = "C:\\Program Files\\Common
> Files\\Microsoft Shared\\web server extensions\\60\\bin\\";
> 		string strCmdLine;
> 		string shortCab;
> 		shortCab = cabName.Text.Substring(cabName.Text.LastIndexOf("\\")+1);
> 		//Build follow-up command
> 		strCmdLine = "stm.exe -o deletewppack -name " + shortCab;
> 		Debug.Write("strCmdLine = " + strCmdLine);
> 		sysProcess.StartInfo.Arguments = strCmdLine;
> 		sysProcess.Start();
> 		sysProcess.Close();
> 	}
> 	catch (Exception ex)
> 	{
> 		Debug.Write("Exception: " + ex);
> 	}
> }

Report this thread to moderator Post Follow-up to this message
Old Post
Joel Martinez
11-30-04 09:01 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

C# archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:19 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.