RunShortcut reliability changes

This commit is contained in:
Terry MacDonald 2021-11-21 13:08:11 +13:00
parent c9c9fcc8b4
commit e4add2570f
2 changed files with 18 additions and 15 deletions

View File

@ -26,8 +26,8 @@ using System.Resources;
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
// Version information
[assembly: AssemblyVersion("2.1.0.282")]
[assembly: AssemblyFileVersion("2.1.0.282")]
[assembly: AssemblyVersion("2.1.0.285")]
[assembly: AssemblyFileVersion("2.1.0.285")]
[assembly: NeutralResourcesLanguageAttribute( "en" )]
[assembly: CLSCompliant(true)]

View File

@ -939,7 +939,9 @@ namespace DisplayMagician
//processesCreated = ProcessUtils.StartProcess(processToStart.Executable, processToStart.Arguments, processToStart.ProcessPriority);
processesCreated = ProcessUtils.StartProcess(processToStart.Executable, processToStart.Arguments, processToStart.ProcessPriority);
// Record the program we started so we can close it later
// Record the program we started so we can close it later (if we have any!)
if (processesCreated.Count > 0)
{
if (processToStart.CloseOnFinish)
{
foreach (Process p in processesCreated)
@ -956,6 +958,7 @@ namespace DisplayMagician
}
}
}
}
catch (Win32Exception ex)
{
logger.Error(ex, $"ShortcutRepository/RunShortcut: Win32Exception starting process {processToStart.Executable}. Windows complained about something while trying to create a new process.");