I made a program that starts the DekaronServer.exe under Windows 7 without crashing.
Just put the Win7_DKLauncher.exe in the same Folder as DekaronServer.exe and open Win7_DKLauncher.exe instead of DekaronServer.exe.
You have to run the program as administrator.
I tested the program under Windows 7 (32bit and 64bit) and Windows Server 2008 R2 (64bit).
Virustotal:
Because some people asked, here is the Sourcecode:
Code:
#include "stdafx.h" #include <iostream> #include <Windows.h> #include <io.h> int _tmain(int argc, _TCHAR* argv[]) { printf("Dekaron-Server Launcher by Toasty\n"); //Look if file "DekaronServer.exe" exists if(_access("DekaronServer.exe", 0) == -1) { printf("DekaronServer.exe not found!\n"); printf("Program will close in 5seconds\n"); Sleep(5000); } else { //Only needed for the CreateProcess function below, no more use in this programm. More info at: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686331(v=vs.85).aspx STARTUPINFO si; //Structure where the CreateProcess function will write the ProcessID and ThreadID of the created Process. More info at: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684873(v=vs.85).aspx PROCESS_INFORMATION pi; //Debug event structure, needed for WaitForDebugEvent and ContinueDebugEvent. More info at: http://msdn.microsoft.com/en-us/library/windows/desktop/ms679308(v=vs.85).aspx DEBUG_EVENT dbge; //Commandline that will used at CreateProcess LPTSTR szCmdline = _tcsdup(TEXT("DekaronServer.exe")); ZeroMemory( &si, sizeof(si) ); //Set memory of the startupinfo structure to Zero (because no initialization was made) si.cb = sizeof(si); //Size of the Structure (see msdn) ZeroMemory( &pi, sizeof(pi) ); //Set memory of the process_information structure to Zero (because no initialization was made) //Start DekaronServer.exe //More info fore CreateProcess function at: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx if( !CreateProcess( NULL, // No module name (use command line) szCmdline, // Command line NULL, // Process handle not inheritable NULL, // Thread handle not inheritable FALSE, // Set handle inheritance to FALSE DEBUG_PROCESS, // Enables Debugging for the started Process http://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx NULL, // Use parent's environment block NULL, // Use parent's starting directory &si, // Pointer to STARTUPINFO structure &pi ) // Pointer to PROCESS_INFORMATION structure ) { printf( "CreateProcess failed (%d).\n", GetLastError() ); return 0; } //Creating Process was sucessful else { printf("Sucessfully launched DekaronServer.exe\n"); //Write ProcessId and ThreadId to the DEBUG_EVENT structure dbge.dwProcessId = pi.dwProcessId; dbge.dwProcessId = pi.dwThreadId; while(true) //infinite loop ("Debugger") { WaitForDebugEvent(&dbge, INFINITE); //Wait for an debugevent to occur http://msdn.microsoft.com/en-us/library/windows/desktop/ms681423(v=vs.85).aspx /* Normally you have to handle the different Debug Events (which get written to dbge.dwDebugEventCode) here, this is actually not needed because the DekaronServer handles the exeptions that causes the DekaronServer to crash at Windows 7 itself, the problem is that the Exeption doesnt get handled the way Windows 7 likes it and terminates the Process therefore. */ //Continue the Programm and tell him that the exeption wasnt handelt (to let him handle the exeption) ContinueDebugEvent(dbge.dwProcessId, dbge.dwThreadId, DBG_EXCEPTION_NOT_HANDLED); //http://msdn.microsoft.com/en-us/library/windows/desktop/ms679285(v=vs.85).aspx } } //Due to the infinite Loop Programm normally never should reach this part ;) //Wait until child process exits. WaitForSingleObject( pi.hProcess, INFINITE ); //Close process and thread handles. CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); } return 0; }
Feel free to modify/do whatever you want with the code