delete file at the time terminate install

Post specialized setup scripts you have created here.
Post Reply
ponnuraj
Posts: 8
Joined: Mon Mar 31, 2008 2:15 am

delete file at the time terminate install

Post by ponnuraj »

Hi,

In my application, i need to delete a text file, at the time of terminating installation. is it possible to delete a file, before the terminate install command.

Can anyone give me the procedure to do this?

Thanks in advance.

Regards,
Raj
CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Post by CandiceJones »

Sure, Raj. Just call DeleteFileA in kernel32.dll using Call DLL Function. Since the Windows Installer stage is over at that point, you need to directly call the Win32 API for the deletion to succeed.

If you're looking for a way to make files available temporarily while setup is running (without having to install them permanently), take a look at the File Bag function or the Support Files/Creatives mechanism.
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply