/build/static/layout/Breadcrumb_cap_w.png

Miscellaneous Question


Will MSI replace an existing File?

01/31/2017 968 views
Suppose there is already a file in %programdata%\Microsoft\book1.xlsx . I have added a component in MSI which is installing this 'book1.xlsx' file (which I have modified and then embedded into a cab file in MSI.) in the same location. Will the MSI replace this file or will it skip installing it if it finds that there is already a file named 'book1.xlsx' in the location?
1 Comment   [ + ] Show comment

Comments

  • so finally it works...


Community Chosen Answer

3
@jonsnow: Most questions here concern automated deployment, where there's no user sitting in front of the screen.

@rileyz: XLAs don't populate their headers with version information (more's the pity)

@OP: Why not use the RemoveFile table to remove it? The RemoveFiles action runs before InstallFiles so provided you use the correct attribute in the table (to trigger removal when installing as well as uninstalling), Bob's your uncle. You won't be asking what the correct attribute is, will you? We don't want to send more LMGTFY links.
Answered 01/31/2017 by: VBScab
Red Belt

All Answers

0
hello ishita,
If you are adding it with the same name then it will show you ,file named already exist and if you want to replace then you can replace it.
Answered 01/31/2017 by: jonsnow
Green Belt

0
  1. Read this on MSDN.
  2. Drink some tea, have a ponder on the subject.
  3. Assign the file book1.xlsx a version whatever authoring tool you use, probably Installshield.
(:
Answered 01/31/2017 by: rileyz
Red Belt

0
@VBScab, i did as u said. I added the file in RemoveFile Table, it works! thanks! 
Thanks and take care everyone! 
Answered 02/01/2017 by: Ishita Tripathi
Yellow Belt

0
@jonsnow See? I'm such a newbie...
Answered 02/01/2017 by: VBScab
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ