How can I suppress external app's messages ?

Amr Ashraf

Member
Joined
Apr 5, 2022
Messages
14
Programming Experience
Beginner
Hello guys , I'm trying to run external app and suppress it's messages , That app showing a message when it completes a simple task , I need to suppress that message so I tried this :
C#:
 public void TrustMe()
        {
            string dir = Environment.CurrentDirectory ;
            using (Process ExternalProcess = new Process())
            {
                ExternalProcess.StartInfo.FileName = dir + @"\BaseetPath.exe";
                ExternalProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                ExternalProcess.Start();
                ExternalProcess.WaitForExit();
            }

        }

The message still showing , So I added this line :
C#:
ExternalProcess.StartInfo.Arguments = "/quiet";

But it didn't work for me , The external app still showing a message after I run it using the mentioned code .
Thanks
 
This is not a C# question. This is a general Windows programming question.

Overall, though, it sounds awfully suspicious for you to have a method called TrustMe() and then for you to suppress the UI of another application that you launch.

It really depends on the other app what it does. You could try starting a terminal server session and run the app in that other session. You could try moving the apps window off screen. You could trying installing a global windows computer based training hook and be notified when an app pops up and hides windows and you can act accordingly.

As an aside, not all apps have a "/quiet" command line parameter. It's up to the app on what it does with the command line parameters passed to it.
 
it sounds awfully suspicious for you to have a method called TrustMe() and then for you to suppress the UI of another application that you launch.

Lol , Trustme is a method I created to run an app which add the current directory to the trusted locations of MS Access 😄 , So I called it `TrustMe` meaning the current folder .
The app showing a simple message showing that the job is done but in German so I tried to prevent that message that's all .
I tried to replace that app with a method to add the current directory to Access trusted location but no luck for now .
Thanks for your help.
 
Back
Top Bottom