delete file at the time terminate install

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

delete file at the time terminate install

Postby ponnuraj » Wed May 07, 2008 8:00 am

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:

Postby CandiceJones » Mon May 19, 2008 7:52 pm

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
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/


Return to “Sample Scripts”

Who is online

Users browsing this forum: No registered users and 24 guests