Alexandre Julliard : oleview: Specify the full application path when starting regedit.exe.

Alexandre Julliard julliard at winehq.org
Tue Oct 27 09:46:32 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 27 11:23:00 2009 +0100

oleview: Specify the full application path when starting regedit.exe.

---

 programs/oleview/oleview.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/programs/oleview/oleview.c b/programs/oleview/oleview.c
index 5f0fdc5..f67c75d 100644
--- a/programs/oleview/oleview.c
+++ b/programs/oleview/oleview.c
@@ -21,7 +21,7 @@
 #include "main.h"
 
 GLOBALS globals;
-static WCHAR wszRegEdit[] = { 'r','e','g','e','d','i','t','.','e','x','e','\0' };
+static const WCHAR wszRegEdit[] = { '\\','r','e','g','e','d','i','t','.','e','x','e','\0' };
 static WCHAR wszFormat[] = { '<','o','b','j','e','c','t','\n',' ',' ',' ',
     'c','l','a','s','s','i','d','=','\"','c','l','s','i','d',':','%','s','\"','\n',
     '>','\n','<','/','o','b','j','e','c','t','>','\0' };
@@ -370,13 +370,17 @@ static int MenuCommand(WPARAM wParam, HWND hWnd)
         {
             STARTUPINFO si;
             PROCESS_INFORMATION pi;
+            WCHAR app[MAX_PATH];
 
+            GetWindowsDirectoryW( app, MAX_PATH - sizeof(wszRegEdit)/sizeof(WCHAR) );
+            lstrcatW( app, wszRegEdit );
             memset(&si, 0, sizeof(si));
             si.cb = sizeof(si);
-            CreateProcess(NULL, wszRegEdit, NULL, NULL, FALSE, 0,
-                    NULL, NULL, &si, &pi);
-            CloseHandle(pi.hProcess);
-            CloseHandle(pi.hThread);
+            if (CreateProcess(app, app, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
+            {
+                CloseHandle(pi.hProcess);
+                CloseHandle(pi.hThread);
+            }
             break;
         }
         case IDM_STATUSBAR:




More information about the wine-cvs mailing list