-
DeleteFile - Path Not Found
I am trying to add a custom action to my project to delete files from a folder in my install directory.
Here's the code. When it runs, it fails, with a "Path not found" error. I have no idea what is wrong. Any help would be greatly appreciated.
#define DEL_DIR "C:\\Program Files (x86)\\Omh\\Mhars2\\cache"
#define DEL_FILE "*.dat"
#define DEL_TRN_DIR "C:\\Program Files (x86)\\OMh\\Mhars2\\cache\\training"
#include "Ifx.h"
export prototype ClearCache(HWND);
function ClearCache(hMSI)
NUMBER nReturn;
begin
nReturn = DeleteFile(DEL_DIR ^ DEL_FILE);
if(nReturn < 0) then
MessageBox(FormatMessage(nReturn), SEVERE);
endif;
//DeleteDir(DEL_TRN_DIR, ALLCONTENTS);
end;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules