cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
BossHogg
Pilgrim

Delete MSI file

Have the following function in the 'script.url' portion of the installer. Trying to uninstall files in the specified installs folder that have a particular name. Was trying to use wildcards, but not even using the full path has been working.

Please advise.


function RemoveMSI_TempFiles (hMSI)
STRING sFile, sInstallDir;
begin
OpenLogFile();
Log("Removing Lathe MSI files");
//Removing Lathe MSI files from HWLInstalls
sFile = sInstallDir^"C:\\HWLInstalls";
if (Is(FILE_EXISTS, sFile)) then
DeleteFile(sInstallDir^"C:\\HWLInstalls\HWLInstalls\HWL Machine*.msi");
Log("Removed HWL files MSI");

CloseFile(g_nLog); //close that log file
endif;
end;
Labels (1)
0 Kudos
3 Replies
Not applicable

Re: Delete MSI file

function RemoveMSI_TempFiles (hMSI)
STRING sFile;
begin
OpenLogFile();
Log("Removing Lathe MSI files");

//Removing Lathe MSI files from HWLInstalls
sFile = "C:\\HWLInstalls\\HWLInstalls\\HWL Machine*.msi"";
if ( DeleteFile(sFile) = 0 ) then
Log("Removed HWL files MSI");
endif;

CloseFile(g_nLog); //close that log file
end;
0 Kudos
BossHogg
Pilgrim

Re: Delete MSI file

Still not working properly
0 Kudos
BossHogg
Pilgrim

GoTo Definition grayed out as well

Also, when you right-click the function, the 'goto definition' portion is grayed out.

(fixed this issue) still unable to remove the msi.
0 Kudos