diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj
index 7685221..b3e717f 100644
--- a/EnvyUpdate/EnvyUpdate.csproj
+++ b/EnvyUpdate/EnvyUpdate.csproj
@@ -16,6 +16,8 @@
true
+ false
+
publish\
true
Disk
@@ -28,10 +30,8 @@
true
0
1.0.0.%2a
- false
false
true
-
AnyCPU
diff --git a/EnvyUpdate/GlobalVars.cs b/EnvyUpdate/GlobalVars.cs
index 6cc8e8b..57c5f1e 100644
--- a/EnvyUpdate/GlobalVars.cs
+++ b/EnvyUpdate/GlobalVars.cs
@@ -11,5 +11,6 @@ namespace EnvyUpdate
public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\";
public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
+ public static bool monitoringInstall = false;
}
}
diff --git a/EnvyUpdate/InfoWindow.xaml b/EnvyUpdate/InfoWindow.xaml
index f52df60..bdc6ca6 100644
--- a/EnvyUpdate/InfoWindow.xaml
+++ b/EnvyUpdate/InfoWindow.xaml
@@ -8,9 +8,13 @@
mc:Ignorable="d"
Title="" Height="400" Width="600" ResizeMode="NoResize" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight">
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/EnvyUpdate/InfoWindow.xaml.cs b/EnvyUpdate/InfoWindow.xaml.cs
index 1686eee..6efe4a5 100644
--- a/EnvyUpdate/InfoWindow.xaml.cs
+++ b/EnvyUpdate/InfoWindow.xaml.cs
@@ -19,6 +19,8 @@ namespace EnvyUpdate
string version = fvi.FileVersion;
labelVer.Content += " " + version;
+ if (GlobalVars.monitoringInstall)
+ labelVer.FontStyle = FontStyles.Italic;
}
private void ButtonWeb_Click(object sender, RoutedEventArgs e)
diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs
index 2361e1d..63ebb1d 100644
--- a/EnvyUpdate/MainWindow.xaml.cs
+++ b/EnvyUpdate/MainWindow.xaml.cs
@@ -3,8 +3,8 @@ using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
+using System.Management;
using System.Net;
-using System.Security.Cryptography;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Media;
@@ -50,15 +50,10 @@ namespace EnvyUpdate
GlobalVars.isMobile = Util.IsMobile();
- string locDriv = Util.GetLocDriv();
- if (locDriv != null)
+ localDriv = Util.GetLocDriv();
+ if (localDriv != null)
{
- localDriv = locDriv;
- textblockGPU.Text = locDriv;
- if (GlobalVars.isMobile)
- textblockGPUName.Text = Util.GetGPUName(false) + " (mobile)";
- else
- textblockGPUName.Text = Util.GetGPUName(false);
+ UpdateLocalVer(false);
}
else
{
@@ -99,6 +94,28 @@ namespace EnvyUpdate
// Check for new updates every 5 hours.
Dt.Interval = new TimeSpan(5, 0, 0);
Dt.Start();
+
+ string watchDirPath = Path.Combine(Environment.ExpandEnvironmentVariables("%ProgramW6432%"), "NVIDIA Corporation\\Installer2\\InstallerCore");
+ if (Directory.Exists(watchDirPath))
+ {
+ GlobalVars.monitoringInstall = true;
+
+ var driverFileChangedWatcher = new FileSystemWatcher(watchDirPath);
+ driverFileChangedWatcher.NotifyFilter = NotifyFilters.Attributes
+ | NotifyFilters.CreationTime
+ | NotifyFilters.FileName
+ | NotifyFilters.LastAccess
+ | NotifyFilters.LastWrite
+ | NotifyFilters.Size;
+ driverFileChangedWatcher.Changed += DriverFileChanged;
+ driverFileChangedWatcher.Created += DriverFileChanged;
+ driverFileChangedWatcher.Deleted += DriverFileChanged;
+
+ driverFileChangedWatcher.Filter = "*.dll";
+ driverFileChangedWatcher.IncludeSubdirectories = false;
+ driverFileChangedWatcher.EnableRaisingEvents = true;
+ }
+
Load();
}
@@ -113,7 +130,7 @@ namespace EnvyUpdate
infoWin.ShowDialog();
}
- private async void Load()
+ private void Load()
{
if (Util.GetDTID() == 18)
radioSD.IsChecked = true;
@@ -288,5 +305,29 @@ namespace EnvyUpdate
buttonSkip.Content = Properties.Resources.ui_skipped;
MessageBox.Show(Properties.Resources.skip_confirm);
}
+
+ private void UpdateLocalVer(bool reloadLocalDriv = true)
+ {
+ if (reloadLocalDriv)
+ localDriv = Util.GetLocDriv();
+ textblockGPU.Text = localDriv;
+ if (GlobalVars.isMobile)
+ textblockGPUName.Text = Util.GetGPUName(false) + " (mobile)";
+ else
+ textblockGPUName.Text = Util.GetGPUName(false);
+ }
+
+ void DriverFileChanged(object sender, FileSystemEventArgs e)
+ {
+ /*
+ string processName = e.NewEvent.Properties["ProcessName"].Value.ToString();
+ string processID = Convert.ToInt32(e.NewEvent.Properties["ProcessID"].Value).ToString();
+
+ Console.WriteLine("Process stopped. Name: " + processName + " | ID: " + processID);
+ */
+
+ UpdateLocalVer();
+ Load();
+ }
}
}
\ No newline at end of file
diff --git a/EnvyUpdate/Properties/AssemblyInfo.cs b/EnvyUpdate/Properties/AssemblyInfo.cs
index a6fa859..95fc8c2 100644
--- a/EnvyUpdate/Properties/AssemblyInfo.cs
+++ b/EnvyUpdate/Properties/AssemblyInfo.cs
@@ -6,11 +6,11 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("EnvyUpdate")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyDescription("Small update checker application for Nvidia GPUs")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("fyr77")]
[assembly: AssemblyProduct("EnvyUpdate")]
-[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.13")]
-[assembly: AssemblyFileVersion("2.13")]
+[assembly: AssemblyVersion("2.16")]
+[assembly: AssemblyFileVersion("2.16")]
diff --git a/LICENSE b/LICENSE
index a8fca58..3051eea 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2019-2022 Jakob Senkl
+Copyright (c) 2019-2023 Jakob Senkl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal