3
Answers

running CommandPrompt from a Windows Service

Tracy Baird

Tracy Baird

15y
4.8k
1
I have a Windows Service that will create a Process object and fire the command prompt with a specific command. The problem I am having is that apparently the command prompt is trying to open a window and I am getting the following error: Error: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. (System.InvalidOperationException) Can anyone help me to make this fire in the background using a windows service or do I have to go another way?
Answers (3)