second user repair / files in %userprofile% - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

nahoj74
Posts: 2
Joined: Tue Jul 05, 2011 1:19 pm

second user repair / files in %userprofile%

Hi,

I'm making an installer that installs a few files and folders directly to the %userprofile% folder. I'm doing it using the steps outlined in http://www.advancedinstaller.com/user-g ... older.html

The files go where they are supposed to but I want to implement a second user repair, forcing the files into the next logged on user profile. To make this happen I'm using active setup.

The problem with the USER_PROFILE property is that it keeps reverting to the first user %userprofile% path (that is the user that installed the .msi in the first place).

This is what it looks like in the log file:

MSI (s) (BC:90) [14:41:14:074]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.
MSI (s) (BC:90) [14:41:14:074]: Doing action: INSTALL
Action start 14:41:14: INSTALL.
MSI (s) (BC:90) [14:41:14:074]: Running ExecuteSequence
MSI (s) (BC:90) [14:41:14:074]: Doing action: PropertySource
MSI (s) (BC:90) [14:41:14:074]: PROPERTY CHANGE: Modifying USER_PROFILE property. Its current value is 'none'. Its new value: 'C:\Users\second_user'.
Action start 14:41:14: PropertySource.
MSI (s) (BC:90) [14:41:14:074]: Doing action: AppSearch
Action ended 14:41:14: PropertySource. Return value 1.
...

MSI (s) (BC:90) [14:41:14:292]: Doing action: CostFinalize
Action ended 14:41:14: IsolateComponents. Return value 0.
MSI (s) (BC:90) [14:41:14:292]: PROPERTY CHANGE: Adding OutOfDiskSpace property. Its value is '0'.
MSI (s) (BC:90) [14:41:14:292]: PROPERTY CHANGE: Adding OutOfNoRbDiskSpace property. Its value is '0'.
MSI (s) (BC:90) [14:41:14:292]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceAvailable property. Its value is '0'.
MSI (s) (BC:90) [14:41:14:292]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceRequired property. Its value is '0'.
MSI (s) (BC:90) [14:41:14:292]: PROPERTY CHANGE: Adding PrimaryVolumeSpaceRemaining property. Its value is '0'.
MSI (s) (BC:90) [14:41:14:292]: Note: 1: 2205 2: 3: MsiAssembly
MSI (s) (BC:90) [14:41:14:292]: Note: 1: 2228 2: 3: MsiAssembly 4: SELECT `MsiAssembly`.`Attributes`, `MsiAssembly`.`File_Application`, `MsiAssembly`.`File_Manifest`, `Component`.`KeyPath` FROM `MsiAssembly`, `Component` WHERE `MsiAssembly`.`Component_` = `Component`.`Component` AND `MsiAssembly`.`Component_` = ?
MSI (s) (BC:90) [14:41:14:292]: PROPERTY CHANGE: Modifying USER_PROFILE property. Its current value is 'C:\Users\second_user'. Its new value: 'C:\Users\first_user'.
MSI (s) (BC:90) [14:41:14:292]: Note: 1: 2205 2: 3: Condition
...

Why does it go back to the first value?

Br Johan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: second user repair / files in %userprofile%

Hello and welcome to the Advanced Installer Forums,

The Windows Installer standard behavior is to use the same initial install location on repair.

If you need the application installed for both users, why don't you use a per-machine location like the Program Files folder?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nahoj74
Posts: 2
Joined: Tue Jul 05, 2011 1:19 pm

Re: second user repair / files in %userprofile%

Hi!

Tank you for your response.

The files i'm trying to install are some presettings for an Java application that puts its config settings in a ".application" under %userprofile%. It is not an inhouse application and I have little influence in regards to where it expects to find its settings.

Br Johan
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: second user repair / files in %userprofile%

Hi,

Unfortunately this is not supported by Windows Installer or by Windows. If a product is installed per-user, it's very hard to force its installation for all users. A solution would be to make your application per-user. This way it matches its dependency.

Another solution would be to handle this from within your application. For example, you can store the third party software in your application folder and make you application copy it in the appropriate location when launched.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”