c# - Running process from hidden window -
i have faced strange problem when trying run process hidden window - process run runs in hidden process, doing wrong? want run child process not hidden.
process.start(path.gettemppath() + "cleanup.exe", path.getdirectoryname(application.startuppath);
you can try creating object of process
class below :
process objprocess = new process(); objprocess.startinfo.useshellexecute = false; objprocess.startinfo.redirectstandardoutput = true; objprocess.startinfo.createnowindow = true; objprocess.startinfo.windowstyle = processwindowstyle.hidden; // passing batch file/exe name objprocess.startinfo.filename = string.format(strbatchfilename); // passing argument objprocess.startinfo.arguments = string.format(strargument); try { objprocess.start(); } catch { throw new exception("batch file not found processing"); }
Comments
Post a Comment