From b2547485c8dc2d1f41b17569ccc74f18a9538ca7 Mon Sep 17 00:00:00 2001 From: Poma Date: Wed, 30 Aug 2017 23:31:15 +0300 Subject: [PATCH] Some shitty antiviruses freak out when they see the string "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" in code, opening this key in 2 steps will avoid false positive detections. Fixes #3. Here is the shame list of AV with crappy heuristics: Ad-Aware AegisLab Arcabit Avast AVG BitDefender Cyren Emsisoft eScan F-Secure GData MAX Palo Alto Networks Qihoo-360 Rising SentinelOne TrendMicro-HouseCall --- Hotsapi.Uploader.Windows/App.xaml.cs | 4 ++-- Hotsapi.Uploader.Windows/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Hotsapi.Uploader.Windows/App.xaml.cs b/Hotsapi.Uploader.Windows/App.xaml.cs index 2ee9525..80c4627 100644 --- a/Hotsapi.Uploader.Windows/App.xaml.cs +++ b/Hotsapi.Uploader.Windows/App.xaml.cs @@ -57,11 +57,11 @@ public string VersionString public bool StartWithWindows { get { - var reg = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"); + var reg = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion").OpenSubKey(@"Run"); return reg.GetValue("Hotsapi") != null; } set { - var reg = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true); + var reg = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion").OpenSubKey(@"Run", true); if (value) { string command = $@"""{Directory.GetParent(AppDir)}\Update.exe"" --processStart Hotsapi.Uploader.exe --process-start-args ""--autorun"""; reg.SetValue("Hotsapi", command); diff --git a/Hotsapi.Uploader.Windows/Properties/AssemblyInfo.cs b/Hotsapi.Uploader.Windows/Properties/AssemblyInfo.cs index 9f8029f..b3e5ebc 100644 --- a/Hotsapi.Uploader.Windows/Properties/AssemblyInfo.cs +++ b/Hotsapi.Uploader.Windows/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // 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("1.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")]