1

I have a software integration program that will launch other applications. A recent Windows 10 update has resulted in the calling application locking up even though the other applications launch. In my code, it is a simple statement. I will use Notepad.exe as an example

 Process.Start(notepad.exe)

Nothing more than that. Any suggestions? I do know that there are settings in group policy editor that can turn this off. However, having to do this with many customers is not an option. Any suggestions? Tom

Tom
  • 527
  • 1
  • 8
  • 28
  • 2
    You say "Microsoft Real time protection crashes" in the title, and "the calling application locking up". Which is it? Do you have an [mcve]? If I run a console program that simply calls `Process.Start(notepad.exe)` in your environment, will it crash/lock-up? Do you have any error messages shown? Anything in the event log? – Flydog57 Nov 24 '21 at 16:12
  • See https://stackoverflow.com/a/9285229/832052 – djv Nov 24 '21 at 16:13
  • @Flydog57 keep reading... "Microsoft Real time protection crashes calling program", it's consistent – djv Nov 24 '21 at 16:13
  • OK, so there is no lock-up, the calling program crashes? A crash and a lock-up (aka a _hang_) are very different symptoms – Flydog57 Nov 24 '21 at 16:16
  • Actually, the calling process keeps running in the background. However, there is no longer a UI. It must be killed with the task manager. – Tom Nov 24 '21 at 16:41
  • Are you simply calling your code from the UI, or a different thread? – djv Nov 24 '21 at 16:58
  • The code is running in the UI, not a different thread. However, the code that continues to run is in a background thread. The UI never gets displayed after this. – Tom Nov 24 '21 at 17:10

1 Answers1

1

This answer suggests disabling UseShellExecute. Try this

Process p = new Process() {
    StartInfo = new ProcessStartInfo("notepad.exe") {UseShellExecute = false}};
p.Start();
djv
  • 15,168
  • 7
  • 48
  • 72
  • I changed my code to this and the software launches . However, it will have to go to the customer with the issue to dfetermine if it is a fix. Thanks, something to look at. – Tom Nov 24 '21 at 17:06