diff options
Diffstat (limited to 'plugins/ProfileManager')
-rw-r--r-- | plugins/ProfileManager/src/pmanagerEx.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index 6383a3d03a..b4e9a20329 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -85,16 +85,7 @@ static INT_PTR CheckDb(WPARAM wParam, LPARAM lParam) static INT_PTR RestartMe(WPARAM wParam, LPARAM lParam)
{
- 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);
return 0;
}
|