return 0 if the uninstaller was successfully copied and executed, not -1
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3671 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5e960e1fd3
commit
010dd61226
1 changed files with 6 additions and 8 deletions
|
@ -70,7 +70,7 @@ char *ValidateTempDir()
|
|||
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
const char *m_Err = _LANG_ERRORWRITINGTEMP;
|
||||
|
||||
int cl_flags = 0;
|
||||
|
@ -81,8 +81,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
|
||||
InitCommonControls();
|
||||
|
||||
g_exec_flags.errlvl=-1;
|
||||
|
||||
#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
|
||||
{
|
||||
extern HRESULT g_hres;
|
||||
|
@ -195,7 +193,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
|
||||
for (x = 0; x < 26; x ++)
|
||||
{
|
||||
// File name need slash before because temp dir was changed by validate_filename
|
||||
static char s[]="A~NSISu_.exe";
|
||||
static char buf2[NSIS_MAX_STRLEN*2];
|
||||
static char ibuf[NSIS_MAX_STRLEN];
|
||||
|
@ -244,9 +241,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
}
|
||||
#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
|
||||
g_exec_flags.errlvl = -1;
|
||||
ret = ui_doinstall();
|
||||
if (g_exec_flags.errlvl == -1)
|
||||
g_exec_flags.errlvl = ret;
|
||||
if (g_exec_flags.errlvl != -1)
|
||||
ret = g_exec_flags.errlvl;
|
||||
|
||||
#ifdef NSIS_CONFIG_LOG
|
||||
#ifndef NSIS_CONFIG_LOG_ODS
|
||||
|
@ -260,14 +258,14 @@ end:
|
|||
if (m_Err)
|
||||
{
|
||||
my_MessageBox(m_Err, MB_OK | MB_ICONSTOP | (IDOK << 20));
|
||||
g_exec_flags.errlvl = 2;
|
||||
ret = 2;
|
||||
}
|
||||
|
||||
#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
|
||||
OleUninitialize();
|
||||
#endif
|
||||
|
||||
ExitProcess(g_exec_flags.errlvl);
|
||||
ExitProcess(ret);
|
||||
}
|
||||
|
||||
void NSISCALL CleanUp()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue