Hi,

I realise that there is a lot of info regarding the packaging of iTunes on this and many other sites but I don't seem to be able to get it working correctly. All I am really wanting to do is copy the 2 iTunesPrefs.xml files to the LocalAppDataFolder\Apple Computer\iTunes and AppDataFolder\Apple Computer\iTunes folders for each user when they log in. My aim is to get the install to copy the 2 xml files down onto the PC and then use the DuplicateFiles table to copy these to the 2 iTunes folders under the users profile. I have managed to get it to work for the user who installs the software but the self heal is not working when a new user runs the application. I am using ORCA to edit a transform of the iTunes.msi

This is what I have done :
Because the 2 xml files are both called iTunesPrefs.xml I have renamed them to iTunesprefs.xml and iTunesprefs1.xml so they can exist together in the root of the source folder and in the INSTALLDIR of the computer.

In the Directory table I have created the following entries so that I can reference the iTunes folders under the users profile:
Directory ...................Dircetory Parent..................Default Dir
LocalAppDataFolder............TARGETDIR....................Application Data
CU_AppleFolder1................LocalAppDataFolder........Apple Computer
CU_AppleFolder..................AppDataFolder...............Apple Computer
CU_iTunesFolder.................CU_AppleFolder.............iTunes
CU_iTunesFolder1...............CU_AppleFolder1............iTunes

In the Component table I have created 2 Current User components
Component...................Directory...................Attributes...................KeyPath
CurrentUser...................CU_iTunesFolder...................4...................CU_Reg
CurrentUser1...................CU_iTunesFolder1...................4...................CU_Reg1

I have read that you should create a CurrentUser component for the files which are going into the users profile and set a HKCU regkey as the keypath. This is where I am a bit stuck. Can I get away with creating just 1 component ? If I only have 1 component doesnt that mean that both xml files will be placed under the sames folder when I use the DuplicateFile table

In the File table I have created 2 entries to bring the 2 xml files down on to the PC and put them in the INSTALLDIR folder.
File....................Component.................FileName.......................FileSize...................Attributes...................Sequence
CU_iTunesPrefs..........iTunes.exe...................iTunesPrefs.xml................175913.......................8192...................2940
CU_iTunesPrefs1........iTunes.exe...................iTunesPrefs1.xml...............967104.......................8192...................2941

In the DuplicateFile table I have created 2 entries
FileKey...................Component ................... File ....................................DestName.......................DestFolder
iTunesPrefs...................CurrentUser...................CU_iTunesPrefs...................iTunesPrefs.xml...................CU_iTunesFolder
iTunesprefs1.................CurrentUser1.................CU_iTunesPrefs1..................iTunesPrefs.xml...................CU_iTunesFolder1

I have also created a CurrentUser feature and assigned it the 2 Current user components I created. I have made the CurrentUser feature the parent for the other features so that self healing should run.

I am not at all sure that the above stuff is correct but the xml files do get copied down to the INSTALLDIR and then copied to the 2 iTunes directories under the installation users' profile. iTunes does run a self repair when a new user runs the shortcut but it doesn't do any of my CurrentUser stuff so no xml files are duplicated to the user profiles. Obviously my setup is not quite right and is possibly more complicated than it needs to be. I think my main question is around the CurrentUser component and how I can get away with 1 component for 2 files that get installed to 2 different places ?

Any help would be much appreciated.

G
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Why complicate things with the DuplicateFile table? Just define the target folder directly in the component. I would use separate components for each file, too.
Answered 11/25/2011 by: VBScab
Red Belt

Please log in to comment
0
Hi

My thinking was that if I use the DuplicateFile table, when I finally get around to getting the self heal to work, the app won't need to connect to the source to collect the .xml files again, it will simply be able to copy them from the INSTALLDIR to the 2 folders under the users' profile. The source files are uncompressed and not in a cab file.

iTunes seems to want to do a self repair as standard practice when a new user runs it but for some reason it is ignoring my CurrentUser stuff.

Cheers

G
Answered 11/25/2011 by: GT
Yellow Belt

Please log in to comment
0
Enable logging using the Group Policy registry setting. That should tell you what's going on.

Remember to turn it off once you're done! :)
Answered 11/25/2011 by: VBScab
Red Belt

Please log in to comment
0
Thanks for the reply.

I think I have figured out what the issue is. The XML files are unversioned so I need to add an entry to the MSIFILEHASH table (not sure how but will attempt to find out). I tested my setup using a versioned file and it copies itself to the users profile when running the self repair. I am attempting to do all this using Orca because the company I am working for don't use Wise which is what I have used in the past. C'est la vie
Answered 11/27/2011 by: GT
Yellow Belt

Please log in to comment
1

Follow below link to package latest version of itunes for Windows 7

http://msiworld.blogspot.com.au/2012/06/re-packaging-apple-itunes-10617-and.html

Answered 06/14/2012 by: piyushnasa
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity