I was finally able to manually replicate this behavior on my end.
Long story short, this issue is happening because the MSI file is deleted before the installation.
Basically, your MSI file is downloaded in the "Updates" folder, which is deleted when the older product is uninstalled.
Normally, this should not be possible, but since the MSI is launched under the System account (which has all the privileges), it actually is.
Please configure your service to download the MSI file in a different location (e.g. %appdata% folder) and:
This is important!
Make sure none of your packages is configured to delete that folder (e.g. the folder where you download the updated MSI does not have a big and red X mark on it in the Advanced Installer project).
How is it possible the installer deletes the MSI when the MSI is running?
Shouldn't the system prevent the file from being deleted because it's in use?
AND
Why did this start all of a sudden ? the code that put the file in this location has not changed for a long time
Last edited by MLiss@Cetrus.com on Fri Apr 03, 2020 1:55 pm, edited 1 time in total.
Normally, if the files is in use, the system should prevent that.
However, since you are running the process under the System account, which haves full privileges (even higher than an Administrator), this seems to be possible.
I was speechless when I found out as well.
All the time I've tested this manually (trying to reproduce the behavior), I have launched the setup from my desktop. I was literally running out of ideas.
Then the idea came to my mind: "what if I try to run the MSI manually from the folder where it is downloaded" (this was literally the only thing I did not do in my countless tests - I always launched the MSI from my desktop)
I reverted the machine, tried that and, bingo, it reproduced.
FOLLOW US
Get the latest news in Application Packaging