How can i run an exe from c# code

Topics: CAB & Smart Client Software Factory
Apr 8, 2005 at 1:34 AM
originally posted by: mimrsh

I have a scenario is i want to print a sale bill. The printer I am using, has an exe file A6Print.exe for printing. When i run this exe file from my code then it will print txt file which i have saved, like that
When user click on print button
i will call routine which make a text file named prnfile.txt
then call A6Print.exe prnfile.txt
this will result in printout of bill
i have created text file but unable to call an exe file
is there some way to call an exe file from code
Apr 8, 2005 at 9:20 AM
originally posted by: Sergey

Use System.Diagnostics.Process.Start()
Apr 10, 2005 at 4:41 AM
originally posted by: mimrsh

sorry boss this is not supported in compact framework
Apr 12, 2005 at 8:45 PM
originally posted by: Sergey

Use DllImportAttribute with CreateProcess() API.