Shania
Posts: 17
Joined: Thu Apr 25, 2013 12:10 pm

Pending delete

Hello! Help me, please.

How to set delete file after restart when uninstalling programs? Before you restart the file is busy and I can't delete it.

Thank you.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Pending delete

Hello,

Please note that this is not related with Advanced Installer.
The Operating Systems prevents from deleting the files that are in use. So, you should make sure that the related files are not in use by another application, service etc. so they can be deleted.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Shania
Posts: 17
Joined: Thu Apr 25, 2013 12:10 pm

Re: Pending delete

Hello, Dan.

I know thath the Operating Systems prevents from deleting the files that are in use. But the Operating Systems will clear the file after rebooting and I can delete it. But delete program until you restart. How do I put a delete file? It was removed once will be free.

Thank you.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Pending delete

Hello Shiva,

We don't have predefined support for this. However you can have your own custom action which implement this scenario like the MoveFileEx function with the MOVEFILE_DELAY_UNTIL_REBOOT flag specified.

In order to launch you .DLL you can go in the “Custom Actions” page and add a predefined Launch attached file custom action with sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

You can use a tool which already has implemented this functionality, like the one from Windows Sysinternals - MoveFile tool but you should take a look first on their license agreement.

If you are using an .EXE which open the window command line you can take a look on the Hide command window article which may be useful to you.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”