Owen Rudge : appwiz.cpl: Execute installer when Modify clicked.

Alexandre Julliard julliard at winehq.org
Wed Jul 15 09:45:58 CDT 2009


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

Author: Owen Rudge <owen at owenrudge.net>
Date:   Tue Jul 14 17:24:51 2009 -0300

appwiz.cpl: Execute installer when Modify clicked.

---

 dlls/appwiz.cpl/appwiz.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index 1815320..0d9e555 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -489,8 +489,9 @@ static void InstallProgram(HWND hWnd)
  * Name       : UninstallProgram
  * Description: Executes the specified program's installer.
  * Parameters : id      - the internal ID of the installer to remove
+ * Parameters : button  - ID of button pressed (Modify or Remove)
  */
-static void UninstallProgram(int id)
+static void UninstallProgram(int id, DWORD button)
 {
     APPINFO *iter;
     STARTUPINFOW si;
@@ -513,8 +514,9 @@ static void UninstallProgram(int id)
             memset(&si, 0, sizeof(STARTUPINFOW));
             si.cb = sizeof(STARTUPINFOW);
             si.wShowWindow = SW_NORMAL;
-            res = CreateProcessW(NULL, iter->path, NULL, NULL, FALSE, 0, NULL,
-                NULL, &si, &info);
+
+            res = CreateProcessW(NULL, (button == IDC_MODIFY) ? iter->path_modify : iter->path,
+                NULL, NULL, FALSE, 0, NULL, NULL, &si, &info);
 
             if (res)
             {
@@ -856,6 +858,7 @@ static BOOL CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
                     break;
 
                 case IDC_ADDREMOVE:
+                case IDC_MODIFY:
                     selitem = SendDlgItemMessageW(hWnd, IDL_PROGRAMS,
                         LVM_GETNEXTITEM, -1, LVNI_FOCUSED|LVNI_SELECTED);
 
@@ -866,7 +869,7 @@ static BOOL CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
 
                         if (SendDlgItemMessageW(hWnd, IDL_PROGRAMS, LVM_GETITEMW,
                           0, (LPARAM) &lvItem))
-                            UninstallProgram(lvItem.lParam);
+                            UninstallProgram(lvItem.lParam, LOWORD(wParam));
                     }
 
                     hImageList = ResetApplicationList(FALSE, hWnd, hImageList);




More information about the wine-cvs mailing list