[Bug 50344] Wine builtin 'regedit' should always restart as 64-bit process under WoW64 regardless if command line arguments have been supplied or not

WineHQ Bugzilla wine-bugs at winehq.org
Thu Dec 17 08:54:29 CST 2020


https://bugs.winehq.org/show_bug.cgi?id=50344

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |source
             Status|UNCONFIRMED                 |NEW
            Summary|wine failed to import HKLM  |Wine builtin 'regedit'
                   |from command line           |should always restart as
                   |                            |64-bit process under WoW64
                   |                            |regardless if command line
                   |                            |arguments have been
                   |                            |supplied or not
          Component|registry                    |programs
     Ever confirmed|0                           |1

--- Comment #10 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

I think the general consensus was to always use 64-bit regedit in 64-bit
WINEPREFIX to avoid user confusion w.r.t. Wine configuration settings
(overrides etc.). The current restart behaviour is indeed inconsistent.

Let's make this bug report useful and adapt builtin regedit restart behaviour
accordingly.

https://source.winehq.org/git/wine.git/blob/ef876fc54e207344b5809f40a59e3d5d610a6fda:/programs/regedit/main.c#l139

--- snip ---
 139 int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR
lpCmdLine, int nCmdShow)
 140 {
 141     MSG msg;
 142     HACCEL hAccel;
 143     BOOL is_wow64;
 144 
 145     if (ProcessCmdLine(GetCommandLineW())) {
 146         return 0;
 147     }
 148 
 149     if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64)
 150     {
 151         STARTUPINFOW si;
 152         PROCESS_INFORMATION pi;
 153         WCHAR filename[MAX_PATH];
 154         void *redir;
 155         DWORD exit_code;
 156 
 157         memset( &si, 0, sizeof(si) );
 158         si.cb = sizeof(si);
 159         GetModuleFileNameW( 0, filename, MAX_PATH );
 160 
 161         Wow64DisableWow64FsRedirection( &redir );
 162         if (CreateProcessW( filename, GetCommandLineW(), NULL, NULL,
FALSE, 0, NULL, NULL, &si, &pi ))
 163         {
 164             WINE_TRACE( "restarting %s\n", wine_dbgstr_w(filename) );
 165             WaitForSingleObject( pi.hProcess, INFINITE );
 166             GetExitCodeProcess( pi.hProcess, &exit_code );
 167             ExitProcess( exit_code );
 168         }
 169         else WINE_ERR( "failed to restart 64-bit %s, err %d\n",
wine_dbgstr_w(filename), GetLastError() );
 170         Wow64RevertWow64FsRedirection( redir );
 171     }
...
--- snip ---

For an automated import 'reg.exe' should be preferred because that's how most
app/games/installers import registry snippets.

There is bug 44755 which aims support to switch between both views using
'/reg:32' and '/reg:64' command line parameters.

There is also "fun" bug 50308 ("Starting certain Wine builtin apps with
explicit SysWOW64 path in 64-bit WINEPREFIX causes infinite process restart
loop (wineboot, winecfg, ...)") ;-)

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list