Ok....it's now compiling without errors....however it's not moving to the next section. Seems to exit no matter what.
Basically I want it to check for the file and if it's there stop all execution, if the file isn't there....then run the next part of the code.
Let me give you a sample of the code. Everything works as it should when complied. (just not with the new part "Added/End Added")
Code:
#include <windows.h>
--------------------------- Added -------------------------------------
#include <fstream>
// Begin File Check
using namespace std;
namespace {
int status = 0; // Default to success
}
int main()
{
// Begin File Check
ifstream in ( "c:\\Program Files\\test\\test-test\\test.exe" );
if ( in )
exit ( status );
}
// End File Check
-------------------------- End Added -------------------------------
DWORD BeQuiet(char* strFunct, char* strstrParams);
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
//XP installer for test server
BeQuiet("cscript.exe", "testinstall\\test\\testreg.vbs");
BeQuiet("testinstall\\test\\test.exe", "");
BeQuiet("testinstall\\testdir\\testsetup.exe", "");
BeQuiet("cscript.exe", "testinstall\\testrem\\testcleanreg.vbs");
and so on........
Thank you.