Re: Make a Windows Service start a windows program.



I recently had to create a program which could launch a .bat file
through the command prompt, you can try tinkering with this code, I
don't know if it will help you though.

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = fileloc;
proc.Start();
proc.WaitForExit();

.



Relevant Pages

  • Re: /Zg question
    ... Maybe there is something typing error in your .bat file. ... If you have any questions regarding VC compiler for .c code, you can still have a new post in community. ... When I run it from the command line (say, Tools> Visual Studio 2005 Command Prompt), it works, for me as well. ... The problem is when I run it from a Custom Rule.c so it runs at the appropriate time), in which case the exact same batch file displays the prototypes in the Output Window and the *.pro file is now empty. ...
    (microsoft.public.vc.ide_general)
  • Re: Running a program from a SQL job
    ... This works fine when running it either as a bat file or just in a cmd ... When I set the SQL job to execute the same bat ... >> command prompt in the background which SQL apparently doesn't do. ... >> command prompt and then execute a program from there. ...
    (microsoft.public.sqlserver.server)
  • Re: running batch file at Windows CE 5.0 boot time
    ... needed, newsreader software handles it like a single message, so you can ... I want to start a bat file at windows ce startup. ... and launch a bat file, but have not succeeded there either. ... Chuck dot Lin @ Symbol dot COM ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: running batch file at Windows CE 5.0 boot time
    ... I want to start a bat file at windows ce startup. ... launch a bat file, but have not succeeded there either. ... Any work around to launch batch file in the boot time. ... Chuck dot Lin @ Symbol dot COM ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: My Documents directory has a "read only" flag
    ... So I didn't lose my mind 100% yet, I have changed the attribute before at a command prompt, not sure about a .bat file though as it's been awhile. ... You Cannot View or Change the Read-Only or System Attribute of Folders ... Rock ...
    (microsoft.public.windowsxp.general)