Merge branch 'safer-startup' of https://github.com/almod90/DS4Windows into almod90-safer-startup

This commit is contained in:
Travis Nickles 2019-11-03 20:24:42 -06:00
commit c1746410dc

View File

@ -345,11 +345,20 @@ namespace DS4Windows.Forms
}
if (onlylnkpath != Process.GetCurrentProcess().MainModule.FileName)
{
try
{
File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk");
appShortcutToStartup();
changeStartupRoutine();
}
catch
{
MessageBox.Show("No access to Autorun/DS4Windows.lnk\nPlease check file permissions", "DS4Windows");
StartWindowsCheckBox.Checked = false;
runStartupPanel.Visible = false;
}
}
}
StartWindowsCheckBox.CheckedChanged += new EventHandler(StartWindowsCheckBox_CheckedChanged);