/build/static/layout/Breadcrumb_cap_w.png

IS/MSI gurus: Folder properties resolve to improper paths at repair

Most of the time, I am editing vendor msi/installers...  This time I am creating my own, running into issues creating my own basic msi with InstallShield 2012 spring (tested behavior on 2011 too).

After much digging, I am finding that any folders I create in a I.S. pre-defined folder/property (in this case [LocalAppDataFolder]\Microsoft) seem to have a set path for the first user that runs the msi.  So when I run a self-heal/repair the user profile data is rewritten to the original profile, not the current profile running the repair.

I have tried changing the directory table key column to all lower case to remove the public property, just in case the property is allowed throught the various phases....  No go...  Though if I just put my files in the root of the pre-defined folder, repair works properly.  Pretty stumped here guys...

Here are some snips from the log of a repair, run as test2 user.  test1 user initially installed the applicaiton.

Initial getfolderpath lines... all seem proper with the proper paths for test2 user.

00086: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\Application Data

00087: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\Favorites

00088: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\NetHood

00089: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\My Documents

00090: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\PrintHood

00091: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\Recent

00092: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\SendTo

00093: (Server): MSI (s) (FC:04) [14:53:34:837]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\Templates

00094: (Server): MSI (s) (FC:04) [14:53:34:847]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Application Data

00095: (Server): MSI (s) (FC:04) [14:53:34:847]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\Local Settings\Application Data

00096: (Server): MSI (s) (FC:04) [14:53:34:847]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\test2\My Documents\My Pictures

Then during Cost Finalize, directory table keys/lines are created as Public Properties, but using the old path from initial installation by test1 user, instead of test2 path...

00193: (Server): MSI (s) (FC:04) [14:53:34:867]: PROPERTY CHANGE: Adding MICROSOFT property. Its value is 'C:\Documents and Settings\test1\Local Settings\Application Data\Microsoft'.

00194: (Server): MSI (s) (FC:04) [14:53:34:867]: PROPERTY CHANGE: Adding OFFICE property. Its value is 'C:\Documents and Settings\test1\Local Settings\Application Data\Microsoft\Office'.

0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: piyushnasa 12 years ago
Red Belt
2

I have also faced this issue.. Create a folder structure from [USERPROFILE]\appdata\local\

this will make sure it works..

Posted by: dandirk 12 years ago
Third Degree Green Belt
0

Hey Piyushnasa,  any clue why it does that?  The only thought that comes to me is because the property isn't public [LocalAppDataFolder]...  I tried a similar method below with the LocalAppDataFolder and it did not work at all, so I assume public property is key.

 

Thanks for the idea... I fixed it like this...

 

1. Added [USERPROFILE] pre-defined folder in Installshield Files and Folders..

2. Created a folder under [USERPROFILE], name doesn't really matter since it will be changed later...  I used "Office", since that was the last dir in the path I need.

3. Created a type 35 Set Directory Custom Action.  Directory Name: OFFICE (directory column from dir table), the same as created above.  Directory Value: [%USERPROFILE]\Local Settings\Application Data\Microsoft\Office\

4. Added CA to execute seq, right after CostFinalize action

5. Set any files/components I wanted to install to the original [USERPROFILE]\Office directory I setup in step 2, the CA will change to the path you actually want during install.

 

I have to support both XP and Win7, so I will create another CA to change the dir to the Win7 path and condition both CA based on OS NTverion.

 

Thanks!

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ