Fixed wow64 redirection. Moved disable before the call to GetFileArchitecture() (#1013)
This commit is contained in:
parent
7a5525ff13
commit
ab5f04f900
|
@ -408,6 +408,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
||||||
}
|
}
|
||||||
cmdLine += L"\"";
|
cmdLine += L"\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(canDisableRedirect)
|
||||||
|
rWow.DisableRedirect();
|
||||||
|
|
||||||
switch(GetFileArchitecture(szPath))
|
switch(GetFileArchitecture(szPath))
|
||||||
{
|
{
|
||||||
case x32:
|
case x32:
|
||||||
|
@ -419,14 +423,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
||||||
|
|
||||||
case x64:
|
case x64:
|
||||||
if(sz64Path[0])
|
if(sz64Path[0])
|
||||||
if(canDisableRedirect)
|
ShellExecute(nullptr, TEXT("open"), sz64Path, cmdLine.c_str(), sz64Dir, SW_SHOWNORMAL);
|
||||||
{
|
|
||||||
rWow.DisableRedirect();
|
|
||||||
ShellExecute(nullptr, TEXT("open"), sz64Path, cmdLine.c_str(), sz64Dir, SW_SHOWNORMAL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
//Execute anyways but without redirect disabled
|
|
||||||
ShellExecute(nullptr, TEXT("open"), sz64Path, cmdLine.c_str(), sz64Dir, SW_SHOWNORMAL);
|
|
||||||
else
|
else
|
||||||
MessageBox(nullptr, LoadResString(IDS_INVDPATH64), LoadResString(IDS_ERROR), MB_ICONERROR);
|
MessageBox(nullptr, LoadResString(IDS_INVDPATH64), LoadResString(IDS_ERROR), MB_ICONERROR);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue