Jump to content


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.
Photo

About installscript


1 reply to this topic

Chr1so

Chr1so
  • Full Members
  • 1 posts

Posted 29 October 2007 - 17:39

About InstallScript
Hi guys is there any way that when I am executing a setup.exe, during the execution of setup.rul I can know what is actually happening if it is a uninstallation or upgrade process, here is the scenario I have an application which depends on other, If I try to run the upgrade a rule is executed in setup.rul and the upgrade is aborted cause it is really trying to uninstall the application and it is not allowed because of the depending application which in a case of real uninstall process it is correctly applied the abortion.
So to skip this rule I need to know before evalute the rule if it is a upgrade process and then skip abortion and if its a uninstall apply the rule.:

MarkEarle

MarkEarle
  • Full Members
  • 10 posts

Posted 11 March 2008 - 14:18

Sure,

All you have to do is add your switch to OnShowUI:

CODE
function OnShowUI()
BOOL   bMaintenanceMode, bUpdateMode;
STRING szIgnore, szTitle;
begin
// Enable dialog caching
Enable( DIALOGCACHE );

// Determine what events to show.
bMaintenanceMode = FALSE;
bUpdateMode      = FALSE;

// Remove this to disabled update mode.
if( UPDATEMODE ) then
 bUpdateMode = TRUE;
endif;

// Remove this to disable maintenance mode.
if( MAINTENANCE ) then
 bMaintenanceMode = TRUE;
endif;

// Show appropriate UI
if( bUpdateMode ) then
 OnUpdateUIBefore();
else
 if( bMaintenanceMode ) then
  OnMaintUIBefore();
 else
  OnFirstUIBefore();
 endif;
endif;

// Move Data
OnMoveData();

if( bUpdateMode ) then
 OnUpdateUIAfter();
else
 if( bMaintenanceMode ) then
  OnMaintUIAfter();
 else
  OnFirstUIAfter();
 endif;
endif;

// Disable dialog caching
Disable(DIALOGCACHE);
end;


Cheers,

ME

Mark
Mitel Networks Corporation
mitel.com