Alexandre Julliard : winecfg: Restart 64-bit version from the system32 directory.
Module: wine Branch: master Commit: d30b39edbf4644dc330e4b381a00c69e030f2893 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d30b39edbf4644dc330e4b381... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 16 11:11:33 2021 +0200 winecfg: Restart 64-bit version from the system32 directory. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winecfg/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/winecfg/main.c b/programs/winecfg/main.c index 9b30ed6e8e0..358b63c00a0 100644 --- a/programs/winecfg/main.c +++ b/programs/winecfg/main.c @@ -230,6 +230,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow) if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64) { + static const WCHAR winecfgW[] = {'\\','w','i','n','e','c','f','g','.','e','x','e',0}; STARTUPINFOW si; PROCESS_INFORMATION pi; WCHAR filename[MAX_PATH]; @@ -238,7 +239,8 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow) memset( &si, 0, sizeof(si) ); si.cb = sizeof(si); - GetModuleFileNameW( 0, filename, MAX_PATH ); + GetSystemDirectoryW( filename, MAX_PATH ); + lstrcatW( filename, winecfgW ); Wow64DisableWow64FsRedirection( &redir ); if (CreateProcessW( filename, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ))
participants (1)
-
Alexandre Julliard