GabrielIacob
Posts: 11
Joined: Tue Dec 08, 2020 10:30 am

"Do not overwrite" operation with file in System32 is not applied

Wed Jun 29, 2022 9:25 am

Hello,

For our Windows 64 bit app, we install a folder under System32. One of the files is marked with the "Do not overwrite existing file" operation with condition set to 1.
We discovered that, at upgrade, the file is still overwritten. We tried to set the properties on the whole folder or use the "never overwrite" on component level, and all other combinations in between, with no success in not overwriting.

After many tests, we concluded that this behavior happens only for System32 folder and SysWow64 or Program Files are working just fine.

The version of AI seems to no matter; we tried most versions between 16.4 to 19.5.
Windows versions used were Win10 21H2 and Win Server 2019 1809 (all VMs).

For a minimum set of steps we created:
- a simple, wizard generated, 64 bit package (AMD64, EM64T) test project
- with one folder named "Test" under System 64 (default overwrite)
- with one txt file under that folder with "Do not overwrite" option with value 1
- execution level set to Run as administrator
- package type set to "EXE setup with resource next to it" with default options
- everything else remaining untouched with the default settings that come with creating a new project

We build two installers with incremented version (major, minor, revision, doesn't matter), choosing to generate a new Product Code.
We install one version, edit the txt file, upgrade with the next, and see that file has been overwritten.

An observation made during out tests, if it can be helpful, is that: during the uninstall phase of the upgrade, the Test folder is completely deleted and recreated on install; something that was not observed with other paths like SysWow64 or Program Files.

We also tried creating a folder named System32 and use that instead of the predefined System 64 one, sadly, with the same result.

We know that this could may very well be an issue with MSI and from Microsoft's side but we would kindly appreciate a confirmation of the issue and cause.

Best regards,
Gabriel Iacob

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: "Do not overwrite" operation with file in System32 is not applied

Thu Jun 30, 2022 11:24 am

Hello Gabriel,

I have run some tests on my end and I can confirm this behavior.

Unfortunately, I can not say for sure why this is happening.

I have opened a ticket so our dev team can further investigate this.


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

GabrielIacob
Posts: 11
Joined: Tue Dec 08, 2020 10:30 am

Re: "Do not overwrite" operation with file in System32 is not applied

Thu Jun 30, 2022 1:33 pm

Hi Catalin,

Thank you for the answer and confirmation.

Regards,
Gabriel Iacob

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: "Do not overwrite" operation with file in System32 is not applied

Thu Jun 30, 2022 1:49 pm

You are welcome, Gabriel!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: "Do not overwrite" operation with file in System32 is not applied

Fri Jul 22, 2022 12:18 pm

Hello Gabriel,

This has been fixed in version 19.7 of Advanced Installer, released on July 18th, 2022.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

GabrielIacob
Posts: 11
Joined: Tue Dec 08, 2020 10:30 am

Re: "Do not overwrite" operation with file in System32 is not applied

Mon Aug 08, 2022 9:24 am

Hello Catalin,

Just came back from vacation. Thank you for the good news. I will surly try new version.

Regards,
Gabriel Iacob

GabrielIacob
Posts: 11
Joined: Tue Dec 08, 2020 10:30 am

Re: "Do not overwrite" operation with file in System32 is not applied

Tue Aug 09, 2022 3:22 pm

Hello Catalin,

I've done in my environment the same tests as mentioned in original post using version 19.7.1 (new project and migration) and I've observed the following:

- The "do not overwrite" behavior works for folders under System32, with the behavior propagating on the contained files.
- The "do not overwrite" behavior for a file inside a folder under System32 still doesn't apply.
- The "do not overwrite" behavior works for a file inside a folder under any other folder besides System32.

With the behavior observed, I would we draw the conclusion that the feature is still not completely fixed.
I hope I'm doing all the configuration correctly and I am once again asking for a confirmation.

There is a possible workaround on my side, using v19.7.1: putting all "do not overwrite" files inside a separate folder and mark that folder as "do not overwrite" and changing some paths in the app, but before doing that, I want to hear from you.

Best wishes,
Gabriel Iacob

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: "Do not overwrite" operation with file in System32 is not applied

Fri Aug 12, 2022 2:54 pm

Hello Gabriel,

I have run some tests and I was indeed able to reproduce the issue you raised:
- The "do not overwrite" behavior for a file inside a folder under System32 still doesn't apply.
I will forward this to our dev team.

Indeed, your workaround will work as I have tested this right now and if the file is present in a child folder of System32, it is not overwritten.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: "Do not overwrite" operation with file in System32 is not applied

Tue Sep 20, 2022 9:35 am

Hello,

This has been fixed in version 19.9 of Advanced Installer.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

GabrielIacob
Posts: 11
Joined: Tue Dec 08, 2020 10:30 am

Re: "Do not overwrite" operation with file in System32 is not applied

Tue Oct 04, 2022 8:27 am

Hello Catalin,

I confirm it is working. Thank you for all information and support.

Regards,
Gabriel Iacob

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: "Do not overwrite" operation with file in System32 is not applied

Tue Oct 04, 2022 11:26 am

You are always welcome, Gabriel!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”