Update SettingsWindow.cpp

This commit is contained in:
DavidXanatos 2022-05-28 22:24:40 +02:00
parent ad7f4a88f4
commit adc9def128
1 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ Qt::CheckState CSettingsWindow__IsContextMenu()
void CSettingsWindow__AddContextMenu() void CSettingsWindow__AddContextMenu()
{ {
QSettings settings("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", QSettings::NativeFormat); QSettings settings("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", QSettings::NativeFormat);
if (settings.value("CurrentBuild") >= 22000) // Windows 11 if (settings.value("CurrentBuild").toInt() >= 22000) // Windows 11
{ {
QProcess Proc; QProcess Proc;
Proc.execute("rundll32.exe", QStringList() << QCoreApplication::applicationDirPath().replace("/", "\\") + "\\SbieShellExt.dll,RegisterPackage"); Proc.execute("rundll32.exe", QStringList() << QCoreApplication::applicationDirPath().replace("/", "\\") + "\\SbieShellExt.dll,RegisterPackage");
@ -248,7 +248,7 @@ void CSettingsWindow__AddContextMenu()
void CSettingsWindow__RemoveContextMenu() void CSettingsWindow__RemoveContextMenu()
{ {
QSettings settings("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", QSettings::NativeFormat); QSettings settings("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", QSettings::NativeFormat);
if (settings.value("CurrentBuild") >= 22000) // Windows 11 if (settings.value("CurrentBuild").toInt() >= 22000) // Windows 11
{ {
QProcess Proc; QProcess Proc;
Proc.execute("rundll32.exe", QStringList() << QCoreApplication::applicationDirPath().replace("/", "\\") + "\\SbieShellExt.dll,RemovePackage"); Proc.execute("rundll32.exe", QStringList() << QCoreApplication::applicationDirPath().replace("/", "\\") + "\\SbieShellExt.dll,RemovePackage");