cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
davide77
Level 5

Reinstall instead of modify/repair option

When the user runs setup.exe again on a system that has the s/w installed I wish that the setup install the software again.. Is there any way to achieve this?
Thank u in advance,
Davide
Labels (1)
0 Kudos
(6) Replies
Tharkhaad
Level 3

You might want to try overriding the OnShowUI event in the InstallScript. Typically the code will appear something like this:

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

// Determine what events to show.
bMaintenanceMode = FALSE;
bMoveData = TRUE;

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

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

if (FALSE != bMoveData) then
// Move Data
OnMoveData();
endif;

// Show appropriate UI after move data
if ( bMaintenanceMode ) then
OnMaintUIAfter();
else
OnFirstUIAfter();
endif;

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

You should simply have to remove any references to maintenance mode:

function OnShowUI()
string szIgnore;
STRING szTitle;
begin
// Enable dialog caching
Enable( DIALOGCACHE );

// Determine what events to show.
bMoveData = TRUE;

// Show appropriate UI
OnFirstUIBefore();

if (FALSE != bMoveData) then
// Move Data
OnMoveData();
endif;

OnFirstUIAfter();

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

Hope this helps!
0 Kudos
davide77
Level 5

it doesnt work and it says 'OnShowUI': function has no prototype declaration. and then OnMoveData: undefined identifier

Maybe because Im using InstallScript MSI project???

What else could I do?
Please help me :D...I m so in a hurry.

davide
0 Kudos
Tharkhaad
Level 3

OnShowUI might only be available in a pure InstallScript project. One other thing that you can try is to override OnMaintUiBefore to call OnFirstUiBefore, so you end up with the same functionality. You would then have to make sure that OnMaintUiAfter calls OnFirstUiAfter as well.
0 Kudos
Christopher_Pai
Level 16

What project type are you using? What you are describing is a Multiple Instance installation servicing pattern and both InstallScript and MSI projects support it, but in different ways.
0 Kudos
moinkhan
Level 5

Christopher Painter wrote:
What project type are you using? What you are describing is a Multiple Instance installation servicing pattern and both InstallScript and MSI projects support it, but in different ways.


how this can be acheive in Basic MSI project type?
0 Kudos
Christopher_Pai
Level 16

These two articles contain ideas and links to additional resources. Let me know if you have any questions:

http://blog.deploymentengineering.com/2006/10/multiple-instance-msis-and.html

http://blog.deploymentengineering.com/2008/03/installshield-2009-beta-part-i.html
0 Kudos