Silent Console Application
-
Can I get a console application to run silently (ie without starting up the DOS window) in .Net?
write it as a service. put all code that does the work in DLL and then you can call it from either a consloe app or service
-
write it as a service. put all code that does the work in DLL and then you can call it from either a consloe app or service
I was thinking more the other way around. What I'm trying to do is when my custom protocol is clicked on (either from Outlook/Word/IE), is determine what application to launch via the rest of the protocol format. I have read that registering a custom protocol can simply be done via the Windows Registry where you specify the protocol handler to run. So, my thoughts are that I build a console application where the rest of the information is sent onto a windows service, which then deterimes and launch the required application. Any suggestions is appreciated.
-
I was thinking more the other way around. What I'm trying to do is when my custom protocol is clicked on (either from Outlook/Word/IE), is determine what application to launch via the rest of the protocol format. I have read that registering a custom protocol can simply be done via the Windows Registry where you specify the protocol handler to run. So, my thoughts are that I build a console application where the rest of the information is sent onto a windows service, which then deterimes and launch the required application. Any suggestions is appreciated.
If you create a windows application but does not create a window for it, it will be effectivelly a DOS application without a console.
-
If you create a windows application but does not create a window for it, it will be effectivelly a DOS application without a console.
i hope " processInfo.WindowStyle = ProcessWindowStyle.Minimized;" will solve youre problem below is detailed settings that i am using ProcessStartInfo processInfo = new ProcessStartInfo(xx, yy); processInfo.UseShellExecute = false; processInfo.RedirectStandardError = true; processInfo.RedirectStandardInput = true; processInfo.StandardOutputEncoding = Encoding.Default; processInfo.RedirectStandardOutput = true; processInfo.CreateNoWindow = true; processInfo.WindowStyle = ProcessWindowStyle.Minimized; Process pingProcess = Process.Start(processInfo);