User config gets auto-repaired multiple times after logout - Advanced Installer Community
CSOB
Posts: 9
Joined: Wed Feb 25, 2015 10:47 am
Location: Prague
Contact: Website

User config gets auto-repaired multiple times after logout

Hello AdvInst,

we have lately experienced an odd issue regarding user config file and an auto-repair function.
The scenario is as following:

We install an application on a user target station, which has a single or multiple files, that are going to be installed to a user roaming profile via auto-repair the first time the user runs it. In our case it's just a single file (license.xml) that goes to "c:\Users\*username*\AppData\Roaming\*appname*\license.xml". We have multiple users running the station, so User A runs the app for the first time and auto-repair determines missing license.xml, puts it in the User A profile and the app starts normally. So far so good. Then he exits the app, logs out and User B comes and runs the same app for his first time. Auto-repair runs again and puts the file in place, as expected. As long as any of those users remain logged on, the app works just fine, they can close it and run it again - auto-repair doesn't trigger the second time.

But then User B logs out, User A comes back and runs the app - he already has his license.xml file in the right place but the advertised shortcut triggers auto-repair again for no obvious reason. I checked the msi installer log in the user profile for more information and it states license.xml has an unknown state, all other files have state Local which is fine. I also tried to google more information about MSI installer client state for components, but couldn't fine any valuable information:

MSI (s) (60:B8) [17:54:03:730]: Component: license.xml; Installed: Local; Request: Local; Action: Local; Client State: Unknown

So User A gets the app "repaired" and he can continue working, he can close it and run again whenever he wants until he logs out. When User B comes back he gets auto-repair triggered the same way as User A with license.xml being unknown client state.

Attributes on the file are in order, it isn't hidden or anything else. In the application AI project everything also appears to be fine, without any modifications to the file component. But we also tried various component attributes, such as 'Shared amongst packages', 'Transitive', etc. with no luck.
This isn't the only application that we have troubles with, lately we run around 10 applications and more keep coming, sharing the same issue. We thought it might be a bug with AI, because we didn't notice this behavior before.

Please help :)

Regards,

Tom
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: User config gets auto-repaired multiple times after logo

Hello Tom,

The repair functionality is triggered only for the features that have an advertised shortcut, each time a key resource of a component from the feature has a changed state (missing, modified, etc.).
The repair is made for the entire feature.
This behavior is controlled by Windows Installer.

Unfortunately, I cannot tell you what is the key in your case and why the repair is triggered.
Can you please send us the .AIP file at support at advancedinstaller dot com so that we can investigate more?

Kind regards,
Irina
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CSOB
Posts: 9
Joined: Wed Feb 25, 2015 10:47 am
Location: Prague
Contact: Website

Re: User config gets auto-repaired multiple times after logo

Irina wrote:Hello Tom,

The repair functionality is triggered only for the features that have an advertised shortcut, each time a key resource of a component from the feature has a changed state (missing, modified, etc.).
The repair is made for the entire feature.
This behavior is controlled by Windows Installer.

Unfortunately, I cannot tell you what is the key in your case and why the repair is triggered.
Can you please send us the .AIP file at support at advancedinstaller dot com so that we can investigate more?

Kind regards,
Irina
Hello Irina,

sending .AIP for one such case in the attachment.

Thanks for a reply
Attachments
AIP.zip
problematic app
(304.63 KiB) Downloaded 401 times
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: User config gets auto-repaired multiple times after logo

Hello Tom,

In order for me to recreate the behavior first I have to install version 15.1 of the product.
The .AIP file you attached is for version 15.2, so the update.

Can you please send the .AIP file of the previous version also?

Kind regards,
Irina
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CSOB
Posts: 9
Joined: Wed Feb 25, 2015 10:47 am
Location: Prague
Contact: Website

Re: User config gets auto-repaired multiple times after logo

Hello,

sending previous version project in the attachment.
How is that version relevant? We have completely clean stations where previous version was never installed and it still happens.
Thanks for help.

Regards,

Tom
Attachments
SyncroSoft_oXygenXMLEditor_15.1_x64_7.0.0.zip
(281.41 KiB) Downloaded 421 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: User config gets auto-repaired multiple times after logo

Hello Tom,

The previous version of your project is not needed. There was a small misunderstanding of your installation scenario in our part, we apologize for the inconvenience.

We have tested your installation scenario by using two roaming users, but we weren't able to replicate the behavior. Can you please make sure none of the component key resources contained by your feature (you can check them in "Organization" page) are missing or have been changed before the time when the repair operation is triggered by an advertise shortcut?

It would be very useful for us if you could replicate the behavior in a buildable sample (new setup project + its referenced files) and send it us to support at advancedinstaller dot com so we can fully test and investigate on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CSOB
Posts: 9
Joined: Wed Feb 25, 2015 10:47 am
Location: Prague
Contact: Website

Re: User config gets auto-repaired multiple times after logo

Daniel wrote:Hello Tom,

The previous version of your project is not needed. There was a small misunderstanding of your installation scenario in our part, we apologize for the inconvenience.

We have tested your installation scenario by using two roaming users, but we weren't able to replicate the behavior. Can you please make sure none of the component key resources contained by your feature (you can check them in "Organization" page) are missing or have been changed before the time when the repair operation is triggered by an advertise shortcut?

It would be very useful for us if you could replicate the behavior in a buildable sample (new setup project + its referenced files) and send it us to support at advancedinstaller dot com so we can fully test and investigate on our side.

All the best,
Daniel
Hello Daniel,

we created a new sample project with two sample files which have the same problem as I described earlier. The project only contains 2 referenced files (cmd.exe and pomocny.txt) and we included MSI auto-repair log files from both users). Testing scenario was following:

1) Package installation under system account
2) User JA19921 logs in and runs the application for the first time - advertised shortcut triggers auto-repair (Absent_ja19921.log), the user can run / close the app as many times as he wants until he logs out
3) User JA19921 logs out
4) User JA10108 logs in
5) User JA10108 runs the application for the first time - advertised shortcut triggers auto-repair (Absent_ja10108.log), works fine after that
6) User JA19921 logs in and runs the application again - auto-repair gets triggered, works fine after that, then he logs out (unknown_JA19921.log)
7) User JA10108 logs in again and runs the app - auto-repair gets triggered again (unknown_JA10108.log)
8) and so on...

Thanks for help,

Tom
Attachments
Sources.zip
(245.19 KiB) Downloaded 391 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: User config gets auto-repaired multiple times after logo

Hello Tom,

I've tested and replicated the behavior. Please give us some time to further investigate this and I'll get back to you as soon as I have a conclusive answer.

Thank you for your patience and understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CSOB
Posts: 9
Joined: Wed Feb 25, 2015 10:47 am
Location: Prague
Contact: Website

Re: User config gets auto-repaired multiple times after logo

Thanks for a fast reply,

we will be waiting for more information.

Regards,

Tom
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: User config gets auto-repaired multiple times after logo

Hello Tom,

After further investigations it seems this happens because Windows Installer stores the paths to the installation components key files in registry, under this key:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components
and every time an advertised shortcut is launched it checks to see if the key file paths are correctly written in the above registry location. For every component of your installation setup is created a key (under the above registry path) having the name set to the compressed GUID of the component.

For instance, after the first installation the path to the "Permachine.txt" file in registry will point to the current installing user (the path will be written here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\14DAA0DDD53692A428C3BC6FED15B608). Then, when the second user will log in, even if the file exists in its APPDATA folder, the above path from registry points to the previous user account. Therefore it seems Windows Installer triggers a repair only to update the above path in registry to point to the current user location.

We tried to search in Microsoft docs for an official explanation of this behavior, but unfortunately there is not too much info about the Windows Installer self healing mechanism.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”