Scripting Question

iTunes 12.5.1 and iTunesPrefs.XML

09/14/2016 5059 views
Seems the settings are no longer stored in iTunesPrefs.xml
Previously some of the settings I need to disable for our environment were stored in that file, but it no longer gets created
running a diff looks like the settings are stored in com.apple.iTunes.plist, but copying a "Modified" version with my settings over doesn't seem to work.

Does anyone have a solution for deployment?
0 Comments   [ + ] Show comments


Community Chosen Answer


With version 12.6 i have create a msi with custom to copy com.apple.iTunes.plist to all users. Before you need to configure Itunes (install, setup and copy com.apple.iTunes.plist).

This script read Hardware Profiles in registry and copy and rename .plist correctly.

For new user you can add active setup.

Const HKEY_LOCAL_MACHINE = &H80000002 
strComputer = "." 
On Error Resume Next
Const OverwriteExisting = True

Dim StrDocandSettings,strSysDrive
Dim aryUser
Dim fso
Dim objShell
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject( "WScript.Shell" )

'Setting the environment for userprofile
Set StrDocandSettings = fso.getFolder(strSysDrive & "\users")
Set aryUser = StrDocandSettings.SubFolders

'Set hardware profiles GUID
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _  
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\IDConfigDB\Hardware Profiles\0001" 
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys 
    strValueName  = "HwProfileGuid" 
    strFullKeyPath = strKeyPath & "\" & subkey 
    oReg.GetStringValue HKEY_LOCAL_MACHINE, strFullKeyPath, strValueName, szValue 

'Restricting the user
  For Each strUserName in aryUser
    If strUserName.name = "All Users" Then
    ElseIf strUserName.name = "Default User" Then
    ElseIf strUserName.name = "Default" Then
    ElseIf strUserName.name = "Public" Then
'creat directory if no exist
If Not fso.FolderExists(StrDocandSettings & "\" & strUserName.name & "\AppData\Roaming\") Then
fso.CreateFolder StrDocandSettings & "\" & strUserName.name & "\" & "AppData\Roaming\"
End if
If Not fso.FolderExists(StrDocandSettings & "\" & strUserName.name & "\AppData\Roaming\Apple Computer\Preferences\ByHost\") Then
fso.CreateFolder StrDocandSettings & "\" & strUserName.name & "\" & "AppData\Roaming\Apple Computer\"
fso.CreateFolder StrDocandSettings & "\" & strUserName.name & "\" & "AppData\Roaming\Apple Computer\Preferences\"
fso.CreateFolder StrDocandSettings & "\" & strUserName.name & "\" & "AppData\Roaming\Apple Computer\Preferences\ByHost\"
End If
'copy file to users profil
Set efile = fso.GetFile(strProgramFiles & "\iTunes\Pref\com.apple.iTunes.plist")
strDestuser = StrDocandSettings & "\" & strUserName.name & "\AppData\Roaming\Apple Computer\Preferences\ByHost\com.apple.iTunes"& szValue &".plist"
efile.Copy(strDestuser) , true
End If
'Delete despktop lnk
If fso.FileExists("C:\Users\Public\Desktop\iTunes.lnk") Then  
fso.DeleteFile "C:\Users\Public\Desktop\iTunes.lnk" 
End If 
Answered 04/04/2017 by: ML1
White Belt

All Answers

Having spent a couple of days looking into this new release, I am inclined to wait until a hopefully less buggy release appears. Trying to turn off the option where Itunes checks to see if it is the default player for audio fails each time. I am also seeing some evidence that there is support for a .globalpreferences.plist file in the users roaming profile, within the Preferences folder, but procmon just reports the file as missing.
The .plist files are also annoyingly a mixture of HTML and binary which would realistically need a vendor config program to generate any global config. Knowing Apple, we may well be waiting a long time.
Answered 10/26/2016 by: EdT
Red Belt

>I'm pretty sure iTunes is *required* to enable tethering / personal hotspot (via USB)?
Not any more (as of v9, if memory serves). One only needs 'Apple Application Support' and 'Apple Mobile Device Support'.

>Or for local encrypted backups
If your devices need to be backed up, you should be using enterprise-friendly devices or take the risk. Besides, what data would be on an iPhone that needs backing up? Email? Nope...on the server. Contacts? Nope...on the server. Documents? Are your users irresponsible enough to have business documents on their iPhones?
Answered 03/23/2017 by: VBScab
Red Belt




To set configuration or re-set configuration .plist files might be used. 

·        "%appdata%\roaming\AppleComputer\Preferences\com.apple.iTunes.plist"

·        "%appdata%\roaming\AppleComputer\Preferences\ByHost\com.apple.iTunes.[HWguid]plist"

1)Just open iTunes, set configuration as you want.

2)Or you can use .plist editor to remove unneeded staff from configfiles. 

Becareful with guid ": .{846ee340-7039-11de-9d20-806e6f6e6963}.


Toset correct guide for each PC you should configure appsearch, regsearch inmsi. 

ForMSI :

RegLocator: SYSTEM\CurrentControlSet\Control\IDConfigDB\Hardware Profiles\0001- HwProfileGuid

Registrywill hold required guid. 

Read guid from registries, copy files to user profiles - all popup's are removed, all configuration is set ;) 

Answered 12/29/2016 by: zigurds.kreslins
Senior Yellow Belt

  • Could you please explain the modifications of the MSI in more detail. I found RegLocator but what do I do then? Add a row? Do you modify the MSI or create a mst? Thanks.

I would seriously *love* to see someone's business case for having iTunes on work equipment.

The point is, this software isn't designed for enterprise deployment. That it could be made to work previously was pure luck.

Tell 'em to buy an iPod.

Answered 09/20/2016 by: VBScab
Red Belt

  • We are deploying iTunes to a mobile phone company. Guess what, they need iTunes on their work equipment.
    Struggling with this latest version too.
    • Managed to get it working with the com.apple.iTunes.plist, however the I couldn't get the "Welcome" screen to not display, my adminflags are correct to include this...weird
  • I'm pretty sure iTunes is *required* to enable tethering / personal hotspot (via USB)? Or for local encrypted backups? iTunes does not equal music...
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