Prevent single file overwriting - 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!

guypb
Posts: 28
Joined: Thu Dec 18, 2008 5:16 pm

Prevent single file overwriting

I have 2 problems really:

1) I am installing a SQL compact database (*.sdf) - I want to completely prevent overwriting of the file if an upgrade is taking place. How do I stop this? I have tried versioning the file itself but this has not worked? If the install is uninstalled and reinstalled, I want the file to be overwritten (which it should be if uninstalled first) but on upgrade I want the original to remain.

2) I want to install a different file dependant on what version of MS Excel (and therefore Office) is installed. This is not a prerequisite that a certain version of Excel MUST be installed, only that if Excel 2003 (version 11 office) or previous is installed, that an *.xls file is installed, and if Excel 2007 (Office v12) or after is installed, that an *.xlsm is installed INSTEAD OF the xls.

Any help?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Prevent single file overwriting

Hello,
1) I am installing a SQL compact database (*.sdf) - I want to completely prevent overwriting of the file if an upgrade is taking place. How do I stop this? I have tried versioning the file itself but this has not worked? If the install is uninstalled and reinstalled, I want the file to be overwritten (which it should be if uninstalled first) but on upgrade I want the original to remain.
You can try the Persistent User Data wizard from the top menu to achieve this.
2) I want to install a different file dependant on what version of MS Excel (and therefore Office) is installed. This is not a prerequisite that a certain version of Excel MUST be installed, only that if Excel 2003 (version 11 office) or previous is installed, that an *.xls file is installed, and if Excel 2007 (Office v12) or after is installed, that an *.xlsm is installed INSTEAD OF the xls.
The following article describes a similar topic. You can easily adapt it to fit your needs.
Use searches on the Search page to determine which version of Office is installed. Use the search result properties inside conditions that determine which of your files install.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
guypb
Posts: 28
Joined: Thu Dec 18, 2008 5:16 pm

Re: Prevent single file overwriting

The following article describes a similar topic. You can easily adapt it to fit your needs.
Sorry - which article?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Prevent single file overwriting

Hi,

I think he meant this forum thread:
http://www.advancedinstaller.com/forums ... 291#p23822

You can search for Excel instead of Word.

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

Return to “Common Problems”