Dear
i have create a windows service. I want to execute hello.exe from windwos service. i try
its both are run hello.exe find. its can't show any form display. but i check on taskbar hello.exe run under System User Name.
Please help me, i how to display hello.exe form from windows service.
Thank in advance.
Bhim Prakash Singh
i have create a windows service. I want to execute hello.exe from windwos service. i try
Code:
ManagementClass processClass = new ManagementClass("Win32_Process");
//Get an input parameters object for this method
ManagementBaseObject inParams = processClass.GetMethodParameters("Create");
//Fill in input parameter values
inParams["CommandLine"] = "calc.exe";
//Execute the method
ManagementBaseObject outParams = processClass.InvokeMethod("Create", inParams, null);
or
ProcessStartInfo startinfo = new ProcessStartInfo();
startinfo.CreateNoWindow = false;
startinfo.UseShellExecute = false;
startinfo.RedirectStandardError = true;
startinfo.RedirectStandardInput = true;
startinfo.FileName = "C:/abc.exe";
startinfo.WorkingDirectory = "C:/";
startinfo.WindowStyle = ProcessWindowStyle.Normal;
Please help me, i how to display hello.exe form from windows service.
Thank in advance.
Bhim Prakash Singh