From 48c7a3f4d7ffcbe62b70f6b0eab1bc8c79e2e5aa Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Mon, 7 Sep 2015 20:08:10 +1000 Subject: [PATCH] regsvr32: Call InstallDll before UnregisterDll when using /u /i. --- programs/regsvr32/regsvr32.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c index a2d83a14517..ff6a3aed491 100644 --- a/programs/regsvr32/regsvr32.c +++ b/programs/regsvr32/regsvr32.c @@ -289,6 +289,12 @@ int wmain(int argc, WCHAR* argv[]) int res = 0; DllFound = TRUE; + if (CallInstall && Unregister) + res = InstallDll(!Unregister, DllName, wsCommandLine); + + if (res) + return res; + if (!CallInstall || (CallInstall && CallRegister)) { if(Unregister) @@ -301,10 +307,8 @@ int wmain(int argc, WCHAR* argv[]) return res; /* Confirmed. The Windows version stops on the first error. */ - if (CallInstall) - { + if (CallInstall && !Unregister) res = InstallDll(!Unregister, DllName, wsCommandLine); - } if (res) return res; -- 2.11.4.GIT