I have an MSI that needs to install a file under the current user's My Documents folder. As the install is runing under the local System context, I'm using Active Setup to kick off a repair of the MSI for each user that logs in. For 80% of the user's this approach works fine and the file is copied under their My Documents folder. For the remaining 20%, this doesn't work and the repair copies the file under the Default User's My Documents folder. This appears to be user specific as a different user can log into the same machine where it previously failed, and it will work fine.

The destination directory is stored in the XML property. This directory path has as it's parents the following chain, INTEREST->MY_DOCUMENTS->USERPROFILE. As you can see in the log file below, the path is fine until the last one, XML. That's where it's getting redirected to the Defailt User's profile. The XML property gets resolved before it's parent directory properties do. I'm not sure why this is, or why it happends for only some users.

MSI (s) (E4:50) [14:34:02:453]: PROPERTY CHANGE: Adding XML property. Its value is 'C:\Documents and Settings\Default User\My Documents\Interest\XML'.
MSI (s) (E4:50) [14:34:02:453]: Note: 1: 2205 2: 3: Condition
MSI (s) (E4:50) [14:34:02:453]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'C:\'.
MSI (s) (E4:50) [14:34:02:453]: PROPERTY CHANGE: Modifying USERPROFILE property. Its current value is 'C:\Documents and Settings\Fred'. Its new value: 'C:\Documents and Settings\Fred\'.
MSI (s) (E4:50) [14:34:02:453]: PROPERTY CHANGE: Adding MY_DOCUMENTS property. Its value is 'C:\Documents and Settings\Fred\My Documents\'.
MSI (s) (E4:50) [14:34:02:453]: PROPERTY CHANGE: Adding INTEREST property. Its value is 'C:\Documents and Settings\Fred\My Documents\Interest\'.
MSI (s) (E4:50) [14:34:02:453]: PROPERTY CHANGE: Modifying XML property. Its current value is 'C:\Documents and Settings\Default User\My Documents\Interest\XML'. Its new value: 'C:\Documents and Settings\Default User\My Documents\Interest\XML\'.


0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



Do the file copy through a script rather than through MSI.

If you run active setup to copy the file through MSI, it will require access to the original source.

It is recommended to copy the required file to Install directory and write a vbscript to copy the file at repair. Or you can also add directly that VBScript in active setup, if you copy VBScript locally through your package as well.

Answered 04/16/2012 by: piyushnasa
Red Belt

  • This essentially how we fixed it last minute. We are installing the file in a common location on the system and then copying it to the user profile via active setup. I'd still love to figure out why this didn't work though. We've used Active Setup to run a repair of the MSI plenty of times before without issue and I don't see anything different about this implementation of it.
Please log in to comment
Answer this question or Comment on this question for clarity



Would it be possible for you to run the install as an online kscript, that way you can specify the user to run the installation as?

Answered 04/16/2012 by: andibogard
Blue Belt

  • It has to run as any user who logs into the machine, not a specific user.
  • These are the options for online kscripts

    Run As:
    Run As Local System
    Run As User logged in to console
    Run As All Logged in Users
    Run As User: _______

    Run As User logged in to console is the one you would choose
Please log in to comment

How did you define the XML property in your MSI? More specifically the INTEREST property, cause I don't see that getting resolved in your log..

Answered 04/16/2012 by: pjgeutjens
Red Belt

  • let me clarify this abit, the INTEREST property seems to point to a folder called Openview, and not a folder called INTEREST, so there might be something off about your directory tree structure
  • That was a bad edit on my part. I was attempting to edit out an internal name. The properties are resolving to the correct path, with the exception of the XML property which goes to the Default User profile.
Please log in to comment