Repair option for deleted/edited file. - 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!

rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

Repair option for deleted/edited file.

Hi,
I’m currently developing the Setup for a Web-Application. In the setup project I’ve created a property-based folder which must be synchronized with a disk folder. The first installation runs without problems.

However the testing-department discovered the following 2 problems:
1) They deleted a file (which is not the key of its component).
2) They edited a file (in our case is the key of the component).

The problem is that after the repair action nothing happens. The deleted file won’t be restored and the changed file won’t be replaced with the original file.
Is there any way to fix these 2 problems?


One more point to the first problem:
it doesn’t happen if the file would be the key of the component. I know you have an option to move that file (one by one) to a new component. But we have a huge application with thousands of files in hundreds of components (automatically generated by Advanced-Installer because of the synchronized folder). Is there any other way to have each file in an own component without having to move each one of them one by one? This would be a real problem when the next version of our application is released because I’d need to check again all those thousands of components to see if somewhere are eventually more files…

I hope there is a better solution for this problem.

Thank you very much,
rn-pro
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Repair option for deleted/edited file.

Hello,

By definition, a Repair it's triggered if a key path for a component is missing so neither test cases include this scenario.

If you want to trigger a repair if any file is missing or modified, you would have to include them in hash and trigger the repair/reinstall from your application.
I hope there is a better solution for this problem.
I'm afraid there is no other automated solution to assign each file to a component.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

Re: Repair option for deleted/edited file.

Hi Mihai,

Thank you very much for your answer.
I understand from your answer that the only one solution for the 1st problem is to generate one component for each file.

However the components are automatically generated von Advanced-Installer because we use the syncronized folder feature.
I also saw that for each .dll file will be an own component generated. Also automatically von Adv.-Installer.

Do you see any possibility that at least in a future version we could configure somehow that we want one component/file for all of our files?
Any other approach is really painfull when we speak about applications with thousands of files. And the basic functionality should be there, you already use it for .dll files.

Thank you very much,
rn-pro
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Repair option for deleted/edited file.

Hi,
I understand from your answer that the only one solution for the 1st problem is to generate one component for each file.
Yes. Although not recommended, this would be a solution.
However the components are automatically generated von Advanced-Installer because we use the syncronized folder feature.
You can manually configure your components in Organization page. Folder synchronization generates new components only when the files are removed from disk and you open the project.
Do you see any possibility that at least in a future version we could configure somehow that we want one component/file for all of our files?
This is not a recommended approach. Windows Installer best practices offer some rules for creating Windows Installer components:
http://msdn.microsoft.com/en-us/library ... s.85).aspx
http://msdn.microsoft.com/en-us/library ... s.85).aspx

Also, a lot of components will greatly increase the installation time.

Modified or removed application files are an uncommon scenario. Most users won't encounter it. Instead of trying to handle this by affecting the majority, a better solution would be to determine why the application files were modified or removed in this particular case. You can then handle the cause instead of trying to fix the result.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

Re: Repair option for deleted/edited file.

Hi Cosmin,

Thank you very much for your quick answer.

I've just tried to follow the msdn links but at least on my computer no one of them works. Could you please test if there is any mistake there?

It's obvious that it shouldn't happen too often that somebody removes a file. But if this is going to happen, even if we offer a repair option this little problem cannot be fixed. In such a case, for an ASP.NET application you just ask yourself for what reason would you offer such a repair when even such a basic problem cannot be fixed?
Yes. Although not recommended, this would be a solution.
What is not recommended to offer support for such a problem or my solution is not the best way to do it? What would be the recommended way to do it?
You can manually configure your components in Organization page.
We have about 5 releases / year. On each release, somebody should check manually some thousands components to see in which components are additional files and move them one by one in a new component. That's actually a real problem in a web application where a lot of new images are inserted with each new release.

Thank you very much,
rn-pro
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Repair option for deleted/edited file.

Hi,
I've just tried to follow the msdn links but at least on my computer no one of them works.
I fixed them.
even if we offer a repair option this little problem cannot be fixed.
An uninstall and reinstall should fix the missing or modified files.
What is not recommended to offer support for such a problem or my solution is not the best way to do it?
The solution is not recommended. A component for each file is not a good idea.
What would be the recommended way to do it?
Like I mentioned in my previous post, the scenario you mentioned is very uncommon. Also, nothing is perfect. You can't make the installation handle all possible problems or scenarios.

Personally I would ignore this scenario. If someone did indeed encounter it, a simple uninstall and reinstall should fix the problem.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”