cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BossHogg
Level 3

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

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
Level 3

Still not working properly
0 Kudos
BossHogg
Level 3

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