#include "stdafx.h"
#include "FarCryInstallJobs.h"
#include "shellapi.h"



FARCRYINSTALLJOBS_API BOOL 
RunShellExecute( TCHAR* pString )
{
	BOOL bRet( FALSE );
	if( 32 < reinterpret_cast< size_t >( ::ShellExecute( 0, 0, pString, 0, 0, SW_SHOW ) ) )
	{
		bRet = TRUE;
	}

#ifdef _DEBUG
	TCHAR pcDbgOutput[ 256 ];
	_stprintf( pcDbgOutput, _T( "ShellExecute( 0, 0, %s, 0, 0, SW_SHOW ) call %s" ), 
		pString, FALSE != bRet ? _T( "succeeded!" ) : _T( "failed!" ) );
	::MessageBox( 0, pcDbgOutput, _T( "In debug build only!" ), MB_OK );
#endif

	return( bRet );
}