Commit a17ff8bc authored by dliroulet's avatar dliroulet
Browse files

Disable trying to execute command or plugins in 64 bits mode.

Solution for LaunchPad bug #966320 only resides in real 64 bits agent
parent f68bee1f
......@@ -215,16 +215,6 @@ DWORD CExecCommand::realCreateProcess(LPCTSTR lpstrCommand, LPCTSTR lpstrPath, B
ASSERT( lpstrCommand);
#if _WIN32_WINNT >= 0x0501
// Disable redirection immediately prior to the native API
// function call if compiled for Windows XP or higher.
if (!Wow64DisableWow64FsRedirection( &pOldWow64Value))
{
m_csOutputA.Format( "CreateProcess Error: %s", GetAnsiFromUnicode( LookupError( GetLastError())));
return 0;
}
#endif
if (m_bComspec)
{
// Find COMSPEC environnement variable to start process
......@@ -234,9 +224,6 @@ DWORD CExecCommand::realCreateProcess(LPCTSTR lpstrCommand, LPCTSTR lpstrPath, B
* Oh gag, we're on Win9x or using COMMAND.COM. Not supported
*/
m_csOutputA.Format( "Get COMSPEC Error: %s", GetAnsiFromUnicode( LookupError( GetLastError())));
#if _WIN32_WINNT >= 0x0501
Wow64RevertWow64FsRedirection( pOldWow64Value);
#endif
return 0;
}
csCommand.Format( _T( "\"%s\" /c %s"), csComspec, lpstrCommand);
......@@ -265,9 +252,6 @@ DWORD CExecCommand::realCreateProcess(LPCTSTR lpstrCommand, LPCTSTR lpstrPath, B
NULL, lpstrPath, &siStartInfo, &piProcInfo))
{
m_csOutputA.Format( "CreateProcess Error: %s", GetAnsiFromUnicode( LookupError( GetLastError())));
#if _WIN32_WINNT >= 0x0501
Wow64RevertWow64FsRedirection( pOldWow64Value);
#endif
return 0;
}
// Close the handles now so anyone waiting is woken.
......@@ -275,9 +259,6 @@ DWORD CExecCommand::realCreateProcess(LPCTSTR lpstrCommand, LPCTSTR lpstrPath, B
// Return process handle
m_hProcessHandle = piProcInfo.hProcess;
dwProcessID = piProcInfo.dwProcessId;
#if _WIN32_WINNT >= 0x0501
Wow64RevertWow64FsRedirection( pOldWow64Value);
#endif
return dwProcessID;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment