From 353c0015669b48bb506c623c12fc08c409decce1 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Thu, 12 Jan 2017 16:47:28 -0800 Subject: [PATCH] Remove InfInstaller Agg dependencies, prevent ShellExecute on launch - Fixes failure to launch InfInstaller/pnputil from InnoSetup --- PrinterDriverInstaller/InfInstaller.cs | 8 +++---- PrinterDriverInstaller/InfInstaller.csproj | 28 +--------------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/PrinterDriverInstaller/InfInstaller.cs b/PrinterDriverInstaller/InfInstaller.cs index 61e92b859..1921bc5a0 100644 --- a/PrinterDriverInstaller/InfInstaller.cs +++ b/PrinterDriverInstaller/InfInstaller.cs @@ -1,5 +1,4 @@ -using MatterHackers.Agg; -using System; +using System; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; @@ -25,7 +24,7 @@ namespace MatterHackers.InfInstaller { Process driverInstallerProcess = new Process(); - driverInstallerProcess.StartInfo.Arguments = "-a {0}".FormatWith(Path.GetFullPath(pathAndDriverToInstall)); + driverInstallerProcess.StartInfo.Arguments = string.Format("-a \"{0}\"", Path.GetFullPath(pathAndDriverToInstall)); driverInstallerProcess.StartInfo.CreateNoWindow = true; driverInstallerProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; @@ -48,10 +47,9 @@ namespace MatterHackers.InfInstaller driverInstallerProcess.StartInfo.FileName = pnPUtilPathAndFileName; driverInstallerProcess.StartInfo.Verb = "runas"; - driverInstallerProcess.StartInfo.UseShellExecute = true; + driverInstallerProcess.StartInfo.UseShellExecute = false; driverInstallerProcess.Start(); - driverInstallerProcess.WaitForExit(); if (!fileExists) diff --git a/PrinterDriverInstaller/InfInstaller.csproj b/PrinterDriverInstaller/InfInstaller.csproj index f9ebfe245..ca6756aa5 100644 --- a/PrinterDriverInstaller/InfInstaller.csproj +++ b/PrinterDriverInstaller/InfInstaller.csproj @@ -1,4 +1,4 @@ - + Debug @@ -141,32 +141,6 @@ - - - {74F6BB6C-9D02-4512-A59A-21940E35C532} - Gui - - - {AE37DE1F-22F7-49EE-8732-FC6BC8DC58D9} - Tesselate - - - {D3E41B4E-BFBB-44CA-94C8-95C00F754FDD} - VectorMath - - - {7E61A5BD-E78F-4B80-88C9-3821B4FA062E} - Csg - - - {657DBC6D-C3EA-4398-A3FA-DDB73C14F71B} - Agg - - - {86F6AAF2-9B50-40B8-A427-1897D76471C5} - PolygonMesh - -