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
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.
InstallScript Custom Action not executed properly.
Started by
kerber
, Aug 25 2003 15:58
1 reply to this topic