Y
yqyq22
Hi, i have created a service with sc.exe in this manner:
sc config JBoss-Custom binpath= "C:\jboss-test.exe D:\jboss421GA\bin
\run.bat"
the service is running with local system account...
then i wrote in this: (jboss-test.exe)
Process jbosstest = new Process();
jbosstest.StartInfo.FileName = @" c:\windows
\system32\cmd.exe";
jbosstest.StartInfo.UseShellExecute = false;
jbosstest.StartInfo.RedirectStandardOutput = false;
jbosstest.StartInfo.RedirectStandardInput = false;
jbosstest.StartInfo.RedirectStandardError = false;
jbosstest.Start();
jbosstest.WaitForExit();
jbosstest.Close();
jbosstest.Dispose();
catch (IOException e)
{
Console.WriteLine(e.StackTrace);
}
I don't understand if the problem is on my code or how i have create a
service with sc.exe..
someone could help me?
thanks a lot in advance
sc config JBoss-Custom binpath= "C:\jboss-test.exe D:\jboss421GA\bin
\run.bat"
the service is running with local system account...
then i wrote in this: (jboss-test.exe)
Process jbosstest = new Process();
jbosstest.StartInfo.FileName = @" c:\windows
\system32\cmd.exe";
jbosstest.StartInfo.UseShellExecute = false;
jbosstest.StartInfo.RedirectStandardOutput = false;
jbosstest.StartInfo.RedirectStandardInput = false;
jbosstest.StartInfo.RedirectStandardError = false;
jbosstest.Start();
jbosstest.WaitForExit();
jbosstest.Close();
jbosstest.Dispose();
catch (IOException e)
{
Console.WriteLine(e.StackTrace);
}
I don't understand if the problem is on my code or how i have create a
service with sc.exe..
someone could help me?
thanks a lot in advance