Dean.Wilson
Posts: 6
Joined: Mon Aug 22, 2011 10:17 am

Overwrite installede XML file with user selected XML file

Hi there,

I have a standard install process that installs an XML file as a normal file.

The last screen in the UI asks the user to optionally select their own XML file from their computer. I need to be able to replace the standard XML file with the one they select.

I have already got it working where it moves or copies files they select to the installed directory (using move copy custom action), however this case is different because a file of the same name already exists and it is not being overwritten. I can see that you can set the version number of the installed XML file but as I cannot set the version of the user selected file I cannot specify this as a newer version (which presumably is why it is not overwriting the existing file)

How can this be done?

Thanks

Dean
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Overwrite installede XML file with user selected XML fil

Hi Dean,

I assume that you have added a new custom dialog for selecting the external file by the user before "VerifyReadyDlg"? If so, you can set a condition on the component of the file being installed
by default in your package using a property set by the user when it selects the external file, for example the path control which will contain the path of the external file.

To locate the component of the installed file just select it in Files and Folders page and press F8.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”