The setup must update files or services that cannot be updat - Advanced Installer Community

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!

ifoko
Posts: 35
Joined: Tue Apr 12, 2011 5:10 pm
Contact: Website

The setup must update files or services that cannot be updat

Hi,

I have a .Net application.

I check my website after a new update download the the new setup and want to start the new setup from my running application and terminate my running application.

Unfortunatly I get the message
"The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the.."

When pressing yes, no reboot is done and the setup works fine. So how can this unessary messeage be avoided?

Any ideas?

regards
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: The setup must update files or services that cannot be u

Hi,

The restart message is given automatically by the Windows Installer if it detects some resources are still in use. Are you sure you close the application before launching the
installation of the new version. Also any other related resources should not be in use, for example if you have a service, it should be stopped.

Sorry for the deleted the link, but our spam policies do not allow posting links on this forums, except the ones from our own web site or the ones from Microsoft.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ifoko
Posts: 35
Joined: Tue Apr 12, 2011 5:10 pm
Contact: Website

Re: The setup must update files or services that cannot be u

I can not close before I start the setup.

May c# code
the setup is downloaded in /Backup/ Directory of the application

Code: Select all

                    var p = new Process { StartInfo = new ProcessStartInfo(Constants.SetupFileName.GetBackupPath()) };
                    p.Start();

                    Owner.Owner.Close(); // Close Window
                    Environment.Exit(0);
You know how to close and start afterwards?

thx and regards
ifoko
Posts: 35
Joined: Tue Apr 12, 2011 5:10 pm
Contact: Website

Re: The setup must update files or services that cannot be u

any ideas how can this best done from .Net code?

regards
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: The setup must update files or services that cannot be u

Hi,

You can create and launch a .BAT that closes your application, waits for it to close and then launches the installer. The .BAT can even auto-delete it self in the end with the right command.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”