diff --git a/DellMonitorControl/DellMonitorControl.csproj b/DellMonitorControl/DellMonitorControl.csproj
index 74dd39a..f5f873e 100644
--- a/DellMonitorControl/DellMonitorControl.csproj
+++ b/DellMonitorControl/DellMonitorControl.csproj
@@ -15,9 +15,9 @@
- 1.1.2
- 1.1.2.0
- 1.1.2.0
+ 1.1.3
+ 1.1.3.0
+ 1.1.3.0
diff --git a/DellMonitorControl/MonitorControl.iss b/DellMonitorControl/MonitorControl.iss
index e43e889..54057b2 100644
--- a/DellMonitorControl/MonitorControl.iss
+++ b/DellMonitorControl/MonitorControl.iss
@@ -1,5 +1,5 @@
#define MyAppName "Monitor Control"
-#define MyAppVersion "1.1.2"
+#define MyAppVersion "1.1.3"
#define MyAppPublisher "MarketAlly"
#define MyAppExeName "DellMonitorControl.exe"
#define MyAppIcon "MonitorIcon.ico"
diff --git a/Library/Library.csproj b/Library/Library.csproj
index bb8b4ad..00a475a 100644
--- a/Library/Library.csproj
+++ b/Library/Library.csproj
@@ -25,13 +25,10 @@
-
-
-
-
-
- Always
-
+
+ PreserveNewest
+ ControlMyMonitor.exe
+
diff --git a/Library/Method/CMMCommand.cs b/Library/Method/CMMCommand.cs
index 1785bb5..02d8764 100644
--- a/Library/Method/CMMCommand.cs
+++ b/Library/Method/CMMCommand.cs
@@ -10,13 +10,14 @@ namespace CMM.Library.Method;
///
public static class CMMCommand
{
- static readonly string CMMTmpFolder = Path.Combine(Path.GetTempPath(), $"CMM");
- static readonly string CMMexe = Path.Combine(CMMTmpFolder, "ControlMyMonitor.exe");
+ static readonly string CMMTmpFolder = Path.Combine(Path.GetTempPath(), "CMM");
+ static readonly string CMMexe = Path.Combine(AppContext.BaseDirectory, "ControlMyMonitor.exe");
static readonly string CMMsMonitors = Path.Combine(CMMTmpFolder, "smonitors.tmp");
public static async Task ScanMonitor()
{
- await BytesToFileAsync(new(CMMexe));
+ // Ensure temp folder exists for output files
+ Directory.CreateDirectory(CMMTmpFolder);
await ConsoleHelper.ExecuteExeAsync(CMMexe, $"/smonitors {CMMsMonitors}");
}
@@ -279,22 +280,4 @@ public static class CMMCommand
return monitors;
}
- static void BytesToFile(FileInfo fi)
- {
- fi.Refresh();
- if (fi.Exists) return;
- if (!fi.Directory.Exists) fi.Directory.Create();
-
- File.WriteAllBytes(fi.FullName, fi.Name.ResourceToByteArray());
- }
-
- static async Task BytesToFileAsync(FileInfo fi)
- {
- fi.Refresh();
- if (fi.Exists) return;
- if (!fi.Directory.Exists) fi.Directory.Create();
-
- await File.WriteAllBytesAsync(fi.FullName, fi.Name.ResourceToByteArray());
- }
-
}