cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
heko_76
Level 4

Uninstallation removes all the files

Hi,

I am using Installshield 2008 professional edition.I have created an Installscript project. I have created a custom log files which logs some data.
However during uninstallation its removing the entries of the log files created.
How do i avoid this?

Secondly i want to create an uninstall log how does one debug the uninstallation events...i am not able to get those events in the debugger.
Labels (1)
0 Kudos
(2) Replies
lopinaki
Level 2

Installshield logs all the operations it does in the uninstall log which it reverts back on uninstall. You can disable logging immediately before performing operations that you don’t want to be logged for uninstallation using Disable(LOGGING) and enable the logging again using Enable(LOGGING) after these operations are over.

Debugging of uninstall is the same as install. Run the Setup.exe from the command line with a /d parameter and do a remove operation of the installed application.

Hope this helps.
0 Kudos
heko_76
Level 4

Hi,
Thanks for you reply. We tried Enable(LOGGING) & Disable logging in our code but where does the log file get generated.We couldnt see the file anywhere or what to look for.

Hope am not missing something as am new to installshield
Following is our sample code:
This is the default uninstall event generated.
function OnUninstall()
string szIgnore, szMsg;
number nResult;
BOOL bOpt1, bOpt2;
begin

// Hide the initial progress dialog.
Enable(LOGGING); //Added enable logging
Disable( DIALOGCACHE );

// Show Uninstall Confirmation Dialog
if( MessageBox( SdLoadString( IFX_MAINTUI_MSG ), MB_YESNO ) != IDYES ) then
abort;
endif;

// Remove all features.
FeatureRemoveAllInMediaAndLog();

// Added in 11.0, disable the cancel button during uninstall.
if( REMOVEALLMODE ) then
Disable( CANCELBUTTON );
endif;

// Added in 11.0 - Set appropriate StatusEx static text.
// Moved in 12.1 - Set before calling Enable( STATUSEX ) to ensure proper product name updating.
SetStatusExStaticText( SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_MAINTUI_REMOVEALL ) );

// Show Status
SetStatusWindow( 0, "" );
Enable( STATUSEX );
StatusUpdate( ON, 100 );


// Uninstall
nResult = FeatureTransferData( MEDIA );

// Handle move data error and abort if error occured.
if( nResult < ISERR_SUCCESS ) then
OnComponentError();
abort;
endif;

// Disable Status
Disable( STATUSEX );

// Show final dialog.
if ( BATCH_INSTALL ) then
SdFinishReboot( SdLoadString(IFX_SDFINISH_REMOVE_TITLE), SdLoadString(IFX_SDFINISH_REMOVE_MSG2), SYS_BOOTMACHINE, "", 0 );
else
SdFinish( SdLoadString(IFX_SDFINISH_REMOVE_TITLE), SdLoadString(IFX_SDFINISH_REMOVE_MSG1), "", "" , "", bOpt1 , bOpt2 );
endif;
Disable(LOGGING); //Called Disable logging
end;
0 Kudos