mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41: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)
|
||||
{
|
||||
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();
|
||||
changeStartupRoutine();
|
||||
}
|
||||
catch
|
||||
else
|
||||
{
|
||||
MessageBox.Show("No access to Autorun/DS4Windows.lnk\nPlease check file permissions", "DS4Windows");
|
||||
StartWindowsCheckBox.Checked = false;
|
||||
runStartupPanel.Visible = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user