mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-25 08:01:49 +01:00
Modify for read only lnk check. Should be sufficient
This commit is contained in:
parent
c1746410dc
commit
9d2ded0606
@ -346,15 +346,15 @@ namespace DS4Windows.Forms
|
|||||||
|
|
||||||
if (onlylnkpath != Process.GetCurrentProcess().MainModule.FileName)
|
if (onlylnkpath != Process.GetCurrentProcess().MainModule.FileName)
|
||||||
{
|
{
|
||||||
try
|
string ds4lnkpath = Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk";
|
||||||
|
if (!new FileInfo(ds4lnkpath).IsReadOnly)
|
||||||
{
|
{
|
||||||
File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk");
|
File.Delete(ds4lnkpath);
|
||||||
appShortcutToStartup();
|
appShortcutToStartup();
|
||||||
changeStartupRoutine();
|
changeStartupRoutine();
|
||||||
}
|
}
|
||||||
catch
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("No access to Autorun/DS4Windows.lnk\nPlease check file permissions", "DS4Windows");
|
|
||||||
StartWindowsCheckBox.Checked = false;
|
StartWindowsCheckBox.Checked = false;
|
||||||
runStartupPanel.Visible = false;
|
runStartupPanel.Visible = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user