Fix file extension in autostart entry

This commit is contained in:
CreepyCrafter24 2020-03-11 18:08:18 +01:00
parent cda579473f
commit 3a297ff9c6
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Resizor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("Resize Windows with style")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Resizor")]

View File

@ -1,5 +1,6 @@
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using CC_Functions.W32.Hooks;
using Microsoft.Win32;
@ -76,7 +77,7 @@ namespace Resizor
try
{
if (startupBox.Checked)
_rkApp.SetValue(AppName, Application.ExecutablePath);
_rkApp.SetValue(AppName, Path.ChangeExtension(Application.ExecutablePath, ".exe"));
else
_rkApp.DeleteValue(AppName, false);
startupBox.Checked = _rkApp.GetValue(AppName) != null;