Hugh McMaster : regsvr32: Call InstallDll before UnregisterDll when using /u /i.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 7 09:20:14 CDT 2015


Module: wine
Branch: master
Commit: 48c7a3f4d7ffcbe62b70f6b0eab1bc8c79e2e5aa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=48c7a3f4d7ffcbe62b70f6b0eab1bc8c79e2e5aa

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Mon Sep  7 20:08:10 2015 +1000

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 a2d83a1..ff6a3ae 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;




More information about the wine-cvs mailing list