diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -88,7 +88,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM string::size_type p = 0, p2 = 0, stop = 0;
{
wstring cmd = _T("--list-secret-keys");
- pxExecute(&cmd, "", &out, &code);
+ if(pxExecute(&cmd, "", &out, &code) == pxNotFound)
+ {
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ break;
+ }
}
cp866_to_cp1251(&out);
while(p != string::npos)
@@ -152,7 +156,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM DWORD code;
wstring cmd = _T("--export -a ");
cmd += fp;
- pxExecute(&cmd, "", &out, &code);
+ if(pxExecute(&cmd, "", &out, &code) == pxNotFound)
+ {
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ break;
+ }
DBWriteContactSettingString(NULL, szModuleName, "GPGPubKey", out.c_str());
}
DBWriteContactSettingByte(NULL, szModuleName, "FirstRun", 0);
|