First post...
InstallShield 2011:
I've created a CustomAction with a AskYesNo dialog (on uninstall) and it works great. However, the dialog will display when doing a Silent Uninstall (msiexec -x \q). How can I supress the dialog in silent uninstall?
Thanks!
Van
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Custom Action dialog displays in Silent Uninstall
Started by
D28Player
, Feb 27 2012 17:22
1 reply to this topic
Posted 27 February 2012 - 18:06
Got the fix...here's my CustomAction
///////////////////////////////////////////////////////////////////////////////
//
// Function: BackupDatabaseDialog
//
// Purpose: Allows user to cancel uninstall to backup configuration database
//
//
//
///////////////////////////////////////////////////////////////////////////////
export prototype BackupDatabaseDialog(HWND);
function BackupDatabaseDialog(hMSI)
LONG lJTMBackupConfigAnswer;
LONG lResult;
STRING svValue;
NUMBER nvDataType;
NUMBER nvDataSize;
NUMBER nCheck1, nCheck2;
NUMBER nvSize;
STRING svLevel;
begin
#define PROGRAM "C:\\Windows\\Notepad.exe"
#define PARAM "C:\\Windows\\Readme.txt"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
// Display the AskYesNo dialog. The default is set to Yes.
nvSize=256;
MsiGetProperty (hMSI, "UILevel",svLevel,nvSize);
if (svLevel = "2") then goto Silent;
endif;
SetDialogTitle (DLG_ASK_YESNO, " Configuration Database");
if (AskYesNo("ATTENTION\r\nContinuing with the removal of [ProductName] will remove the data associated.\r\nWould you like to backup this data before removing? ", YES) = YES) then
SetDialogTitle (DLG_MSG_WARNING, "Configuration Database");
MessageBox("To backup Data:\r\n1.",INFORMATION);
exit;
endif;
Silent:
lResult = 0;
return lResult;
///////////////////////////////////////////////////////////////////////////////
//
// Function: BackupDatabaseDialog
//
// Purpose: Allows user to cancel uninstall to backup configuration database
//
//
//
///////////////////////////////////////////////////////////////////////////////
export prototype BackupDatabaseDialog(HWND);
function BackupDatabaseDialog(hMSI)
LONG lJTMBackupConfigAnswer;
LONG lResult;
STRING svValue;
NUMBER nvDataType;
NUMBER nvDataSize;
NUMBER nCheck1, nCheck2;
NUMBER nvSize;
STRING svLevel;
begin
#define PROGRAM "C:\\Windows\\Notepad.exe"
#define PARAM "C:\\Windows\\Readme.txt"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
// Display the AskYesNo dialog. The default is set to Yes.
nvSize=256;
MsiGetProperty (hMSI, "UILevel",svLevel,nvSize);
if (svLevel = "2") then goto Silent;
endif;
SetDialogTitle (DLG_ASK_YESNO, " Configuration Database");
if (AskYesNo("ATTENTION\r\nContinuing with the removal of [ProductName] will remove the data associated.\r\nWould you like to backup this data before removing? ", YES) = YES) then
SetDialogTitle (DLG_MSG_WARNING, "Configuration Database");
MessageBox("To backup Data:\r\n1.",INFORMATION);
exit;
endif;
Silent:
lResult = 0;
return lResult;