Skip to content

Commit

Permalink
dpi installation when themes
Browse files Browse the repository at this point in the history
  • Loading branch information
rounk-ctrl committed Oct 9, 2023
1 parent 3be2f2e commit 93618db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
9 changes: 0 additions & 9 deletions Rectify11.Phase2/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,6 @@ private static void Main(string[] args)
}
for (int k = 0; k < uninstallFiles.Length; k++)
{

if (pendingFiles[k].Contains("mmcbase.dll.mun")
|| pendingFiles[k].Contains("mmcndmgr.dll.mun")
|| pendingFiles[k].Contains("mmc.exe"))
{
Process.Start(Path.Combine(Variables.sys32Folder, "reg.exe"), @" ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide /v PreferExternalManifest /t REG_DWORD /d 0 /f");
SafeFileDeletion(Path.Combine(Variables.sys32Folder, "mmc.exe.manifest"));
}

if (uninstallFiles[k].Contains("mmc.exe"))
{
foreach (var process in Process.GetProcessesByName("mmc"))
Expand Down
9 changes: 0 additions & 9 deletions Rectify11Installer/Core/Backend/Icons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@ public static bool Install(FrmWizard frm)
Helper.ImportReg(Path.Combine(Variables.r11Files, "screensaver.reg"));
}

// mmc dpi fix
if (InstallOptions.iconsList.Contains("mmcbase.dll.mun")
|| InstallOptions.iconsList.Contains("mmc.exe.mui")
|| InstallOptions.iconsList.Contains("mmcndmgr.dll.mun"))
{
Process.Start(Path.Combine(Variables.sys32Folder, "reg.exe"), @" ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide /v PreferExternalManifest /t REG_DWORD /d 1 /f");
Helper.SafeFileOperation(Path.Combine(Variables.r11Files, "mmc.exe.manifest"), Path.Combine(Variables.sys32Folder, "mmc.exe.manifest"), Helper.OperationType.Copy);
}

// runs only if mmc.exe.mui is selected
if (InstallOptions.iconsList.Contains("mmc.exe.mui"))
{
Expand Down
8 changes: 8 additions & 0 deletions Rectify11Installer/Core/Backend/Themes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public static bool Install()
{
Logger.Warn("Installr11cpl() failed", ex);
}

// mmc dpi fix
Process.Start(Path.Combine(Variables.sys32Folder, "reg.exe"), @" ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide /v PreferExternalManifest /t REG_DWORD /d 1 /f");
Helper.SafeFileOperation(Path.Combine(Variables.r11Files, "mmc.exe.manifest"), Path.Combine(Variables.sys32Folder, "mmc.exe.manifest"), Helper.OperationType.Copy);

Variables.RestartRequired = true;
Logger.WriteLine("Themes.Install() succeeded.");
Logger.WriteLine("══════════════════════════════════════════════");
Expand Down Expand Up @@ -133,6 +138,9 @@ public static bool Uninstall()
UninstallR11Cpl();
Logger.WriteLine("Deleted Rectify11 Control Center.");

Process.Start(Path.Combine(Variables.sys32Folder, "reg.exe"), @" ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide /v PreferExternalManifest /t REG_DWORD /d 0 /f");
Helper.SafeFileDeletion(Path.Combine(Variables.sys32Folder, "mmc.exe.manifest"));

Logger.WriteLine("Themes.Uninstall() succeeded.");
Logger.WriteLine("══════════════════════════════════════════════");
return true;
Expand Down

0 comments on commit 93618db

Please sign in to comment.