/build/static/layout/Breadcrumb_cap_w.png

Will MSI replace an existing File?

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
  • so finally it works... - jonsnow 7 years ago

Answers (5)

Posted by: anonymous_9363 7 years ago
Red Belt
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.

Comments:
Posted by: jonsnow 7 years ago
Green Belt
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.
Posted by: rileyz 7 years ago
Red 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.
(:
Posted by: Ishita Tripathi 7 years ago
Yellow Belt
0
@VBScab, i did as u said. I added the file in RemoveFile Table, it works! thanks! 
Thanks and take care everyone! 
Posted by: anonymous_9363 7 years ago
Red Belt
0
@jonsnow See? I'm such a newbie...

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