I am developing a Windows service, which aims to be verifying if an application is running or not and if it is not running, what you should do is run the application.
The application that must run is OneClick Application type (.appref-ms), for which I use the following code.
Application = @"C:\User\MyUser\App.appref.ms";
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = Application;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
process.Start();
When I throw the exception the description says the following:
The specified executable is not a valid application for this operating system platform.
Could someone guide me to find a way to run the application from the code. Thank you very much in advance.r