We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

travdes
Posts: 2
Joined: Thu Feb 09, 2006 5:18 am
Contact: ICQ Yahoo Messenger

Removal of Files after reboot

I have a bit of a problem and I'm wondering about teh best approach to fix it. When performing an upgrade (uninstalling the previuos build), it stops the server, which sometimes hangs onto files so when it removes files it is not able to due to the server locking them. Then it performs the installation, and reboots. After reboot it removes the files which were meant to be removed uring the uninstall. Is there a way to a) not clean up files after reboot, or b) check the server (like a ping) before the file removal? To be clear, we use the installer to deploy a webserver + webapplication. Thanks for your assistance.

To note: for future releases I've made the specific files that get locked 'permanent' so they are not removed. But this doesnt help me on the machines that already have it installed.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,
Is there a way to a) not clean up files after reboot, or b) check the server (like a ping) before the file removal?
a) No, Windows Installer automatically removes the files locked during the uninstallation after reboot.

b) If you can stop the server programatically, then you can check if the server is still active (using a Custom Action). The question is: how would that result be used?

I would recommend the following approach: the server is stopped using a Custom Action scheduled on the InstallInitialize stage (before any files are removed). The Execution Condition for this Custom Action will be: (REMOVE="ALL")

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
travdes
Posts: 2
Joined: Thu Feb 09, 2006 5:18 am
Contact: ICQ Yahoo Messenger

Repair

I've tried your suggestion. I also tried writing a vb script which shutsdown the server, and waits for the shutdown to occur before uninstallation. But it still happens. Is there a way to run the repair function of the msi at the end of the installation? The repair is the only way to repair the installation but our IT seem to refuse to use it so i'm wondering if there's a way to automate it. For example, after the installation is complete is there a way to call the repair function as a post install function (would have to happen after the reboot tho)
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,
I've tried your suggestion. I also tried writing a vb script which shutsdown the server, and waits for the shutdown to occur before uninstallation. But it still happens.
If the files are still locked after the VBScript is executed then either:
- the script does not properly stop the server
- there are other processes which are using the file(s)
For example, after the installation is complete is there a way to call the repair function as a post install function (would have to happen after the reboot tho)
I do not see how the Repair function of a MSI package would be useful in this case. However, you can invoke "msiexec" with the "/f" command line option (in a Custom Action, for example). See the following page for details:
http://msdn.microsoft.com/library/defau ... ptions.asp

In order to execute a program (only once) after reboot, you have to write the command to be run to the following registry key:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
It is impossible to give you clear instructions about how this problem can be solved unless you provide more details about your application, etc.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”