diff --git a/contrib/packaging/hgpackaging/inno.py b/contrib/packaging/hgpackaging/inno.py
--- a/contrib/packaging/hgpackaging/inno.py
+++ b/contrib/packaging/hgpackaging/inno.py
@@ -29,7 +29,6 @@
 
 PACKAGE_FILES_METADATA = {
     'ReadMe.html': 'Flags: isreadme',
-    'hg.exe': "AfterInstall: Touch('{app}\\hg.exe.local')",
 }
 
 
diff --git a/contrib/packaging/hgpackaging/py2exe.py b/contrib/packaging/hgpackaging/py2exe.py
--- a/contrib/packaging/hgpackaging/py2exe.py
+++ b/contrib/packaging/hgpackaging/py2exe.py
@@ -211,3 +211,9 @@
     files.
     """
     process_install_rules(STAGING_RULES, source_dir, staging_dir)
+
+    # An empty .exe.local file enables DLL Redirection and forces
+    # Windows to look for DLLs relative to the .exe.
+    # See https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection.
+    with (staging_dir / 'hg.exe.local').open('ab'):
+        pass
diff --git a/contrib/packaging/inno/mercurial.iss b/contrib/packaging/inno/mercurial.iss
--- a/contrib/packaging/inno/mercurial.iss
+++ b/contrib/packaging/inno/mercurial.iss
@@ -68,7 +68,6 @@
 [UninstallDelete]
 Type: files; Name: {app}\Mercurial.url
 Type: filesandordirs; Name: {app}\default.d
-Type: files; Name: "{app}\hg.exe.local"
 
 [Icons]
 Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}