James Hawkins : advpack: Implement the RunPreSetupCommands command.

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 5 12:11:06 CDT 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Apr 28 20:08:10 2006 -0500

advpack: Implement the RunPreSetupCommands command.

---

 dlls/advpack/install.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c
index 8c44f94..25f6205 100644
--- a/dlls/advpack/install.c
+++ b/dlls/advpack/install.c
@@ -59,6 +59,9 @@ typedef HRESULT (*iterate_fields_func)(H
 /* Advanced INF commands */
 static const WCHAR PerUserInstall[] = {'P','e','r','U','s','e','r','I','n','s','t','a','l','l',0};
 static const WCHAR RegisterOCXs[] = {'R','e','g','i','s','t','e','r','O','C','X','s',0};
+static const WCHAR RunPreSetupCommands[] = {
+    'R','u','n','P','r','e','S','e','t','u','p','C','o','m','m','a','n','d','s',0
+};
 static const WCHAR RunPostSetupCommands[] = {
     'R','u','n','P','o','s','t','S','e','t','u','p','C','o','m','m','a','n','d','s',0
 };
@@ -140,7 +143,7 @@ static HRESULT register_ocxs_callback(HI
     return hr;
 }
 
-static HRESULT run_post_setup_commands_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, void *arg)
 {
     ADVInfo *info = (ADVInfo *)arg;
     INFCONTEXT context;
@@ -291,6 +294,11 @@ static HRESULT adv_install(ADVInfo *info
 {
     HRESULT hr;
 
+    hr = iterate_section_fields(info->hinf, info->install_sec, RunPreSetupCommands,
+                                run_setup_commands_callback, info);
+    if (hr != S_OK)
+        return hr;
+
     hr = iterate_section_fields(info->hinf, info->install_sec,
                                 RegisterOCXs, register_ocxs_callback, NULL);
     if (hr != S_OK)
@@ -302,7 +310,7 @@ static HRESULT adv_install(ADVInfo *info
         return hr;
 
     hr = iterate_section_fields(info->hinf, info->install_sec, RunPostSetupCommands,
-                                run_post_setup_commands_callback, info);
+                                run_setup_commands_callback, info);
     if (hr != S_OK)
         return hr;
 




More information about the wine-cvs mailing list