Running command using Process class

V

Vicky_r

hi..

I am using Process class to run a .bat file. The .bat file contains
the code to run the Session StateServer.

First I have written a command in a text file then I convert it to bat
and with the help of Process I run the bat file.

Now when I use this line "cd
C:\WINNT\Microsoft.NET\Framework\v2.0.50727 net start aspnet_state" its
not executing as there is some mistake in the line tht I am not
getting.

If I use same Process class to run the command
"cd C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 RegAsm
ClassLibrary1.dll"
This is working fine without any problem...

Plz help me ....
Waiting for ur reply... :-(

Vicky.... :)
 
G

Guest

try
"net start C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_state"
I am using Process class to run a .bat file. The .bat file contains
the code to run the Session StateServer.

First I have written a command in a text file then I convert it to bat
and with the help of Process I run the bat file.

Now when I use this line "cd
C:\WINNT\Microsoft.NET\Framework\v2.0.50727 net start aspnet_state" its
not executing as there is some mistake in the line tht I am not
getting.

If I use same Process class to run the command
"cd C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 RegAsm
ClassLibrary1.dll"
This is working fine without any problem...

Plz help me ....
Waiting for ur reply... :-(

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
V

Vicky_r

Hi Michael.. thx a lot for ur kind reply.... But it didnt work :-(
Any other option ?
 
G

Guest

It cant work :) I've missed your net start command

"net start" is responsible for the starting Windows Service by name. and you
are trying to use net start with the path and executable file.

You either call you aspnet_stat directly like
"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_state.exe"
or "net start said:
Hi Michael.. thx a lot for ur kind reply.... But it didnt work :-(
Any other option ?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top