Skip to content

Commit

Permalink
Merge branch 'jay' of https://github.com/Ryochan7/DS4Windows into jay
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-n authored and mika-n committed Nov 4, 2019
2 parents 11008be + 7120fea commit 1c6f170
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions DS4Windows/DS4Forms/DS4Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,18 @@ public DS4Form(string[] args)

if (onlylnkpath != Process.GetCurrentProcess().MainModule.FileName)
{
File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk");
appShortcutToStartup();
changeStartupRoutine();
string ds4lnkpath = Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk";
if (!new FileInfo(ds4lnkpath).IsReadOnly)
{
File.Delete(ds4lnkpath);
appShortcutToStartup();
changeStartupRoutine();
}
else
{
StartWindowsCheckBox.Checked = false;
runStartupPanel.Visible = false;
}
}
}

Expand Down

0 comments on commit 1c6f170

Please sign in to comment.