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

InstallScript Custom Action not executed properly.


1 reply to this topic

kerber

kerber
  • Members
  • 13 posts

Posted 25 August 2003 - 15:58

Hi,

I have created created a custom action using installscript that is executed after the InstallFinalize sequence. This action is executed, but does not behave properly.

Here is my function:

function RemoveInstalledFiles(hMSI)
STRING szDirIdentifier, szDir, szFile, szFileName;
STRING svDirValue, svResult;
INT nvBufferSize;
begin

// get the value of INSTALLDIR
szDirIdentifier = "INSTALLDIR";
MsiGetTargetPath ( ISMSI_HANDLE , szDirIdentifier , svDirValue , nvBufferSize );

// Delete the DATABASE dir.
szDir = svDirValue + "Database\\";
if (ExistsDir (szDir) = EXISTS) then
DeleteDir ( szDir , ALLCONTENTS );
endif;

// Delete the SYSTEMDATA dir.
szDir = svDirValue + "SystemData\\";
if (ExistsDir (szDir) = EXISTS) then
DeleteDir ( szDir , ALLCONTENTS );
endif;

// Delete the SAMPLEDATA dir.
szDir = svDirValue + "SystemData\\";
if (ExistsDir (szDir) = EXISTS) then
DeleteDir ( szDir , ALLCONTENTS );
endif;

// Delete the Files.ini file.
szFileName = "Files.ini" ;
if (FindFile ( svDirValue , szFileName, svResult) = 0) then
szFile = svDirValue + svResult;
DeleteFile ( szFile );
endif;

// set return value.
return ERROR_SUCCESS;

end;

I need this function to delete sql scripts that will be executed during the installation, but the files are still there although the function is executed.

Can some one help me?

Thanks

Klaus

gelya

gelya
  • Members
  • 6 posts

Posted 01 March 2004 - 09:57

Hi Klaus,

check that your custom action is called before IsSetupFilesCleanup in the Execute Sequence.

Gelya