From 4a38e2b5de9f41f8bb3fa74457f98b2b69b9d56c Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 29 Jan 2013 06:47:37 +0000 Subject: added ability to restart with current profile git-svn-id: http://svn.miranda-ng.org/main/trunk@3328 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/src/Utils.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'plugins/PluginUpdater/src') diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index facbf0b9d1..54702c5c27 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -170,16 +170,7 @@ BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) void __stdcall RestartMe(void*) { - TCHAR mirandaPath[MAX_PATH], cmdLine[100]; - PROCESS_INFORMATION pi; - STARTUPINFO si = {0}; - si.cb = sizeof(si); - GetModuleFileName(NULL, mirandaPath, SIZEOF(mirandaPath)); - TCHAR *profilename = Utils_ReplaceVarsT(_T("%miranda_profilename%")); - mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d /profile=%s"), mirandaPath, GetCurrentProcessId(), profilename); - CallService("CloseAction", 0, 0); - CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - mir_free(profilename); + CallService(MS_SYSTEM_RESTART, 1, 0); } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3