Fixed win8FileReg key not being updated

This commit is contained in:
erri120 2019-10-28 15:07:30 +01:00
parent c676aed591
commit cd9e11045e
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -71,11 +71,13 @@ namespace Wabbajack.Common
appReg?.CreateSubKey("DefaultIcon")?.SetValue("", iconPath);
appAssocReg?.CreateSubKey("UserChoice")?.SetValue("Progid", "Applications\\Wabbajack.exe");
SHChangeNotify(0x000000, 0x0000, IntPtr.Zero, IntPtr.Zero);
if (!IsWin8()) return;
var win8FileReg = Registry.CurrentUser.CreateSubKey(Win8RegPath);
win8FileReg?.CreateSubKey("shell\\open\\command")?.SetValue("", $"\"{appPath}\" -i %i");
if (IsWin8())
{
var win8FileReg = Registry.CurrentUser.CreateSubKey(Win8RegPath);
win8FileReg?.CreateSubKey("shell\\open\\command")?.SetValue("", $"\"{appPath}\" -i %i");
}
SHChangeNotify(0x000000, 0x0000, IntPtr.Zero, IntPtr.Zero);
}
}
}