Hello,
I need some help.

When i installing new version of application, i need to delete temp(from older app) from C:\users\[user_name]\appdata\roaming\[company_name]\temp
I tried this, but its not working.

InstallScript:


#define TEMP_DIR "%appdata%\\[complany_name]\\temp"
#include "Ifx.h"

export prototype TempDelete(HWND);
function TempDelete(hMSI)

begin


if (DeleteDir (TEMP_DIR, ALLCONTENTS) = 0) then
MessageBox ("TEMP_DIR + " was deleted.", INFORMATION")
else
MessageBox ("Unable to delete directory.", SEVERE)
endif;


end

Can you tell me what i do wrong?
Thank you! :-)