If the error message iTunes library.itl file is locked still there after trying the methods above, you can try to repair iTunes library with Free Tenorshare TunesCare. This iTunes repair tool is able to fix a series of iTunes errors as well as syncing issues. Here's how it works.

  1. Now, delete these files – 'iTunes Library.itl', 'iTunes Library Genius.itdb', 'sentinel' (ensure that the hidden files are displaying in Finder) and 'iTunes Library Extras.itdb' If iCloud Music Library is enabled when opening iTunes, hit on 'File' and choose 'Add to Library'. Go to existing iTunes media folder then and highlight it.
  2. Apr 29, 2011 Drag the iTunes Library file from the Desktop back to the iTunes folder you original took it from and then click the Replace button to continue. Now you should be able to launch iTunes as normal without receiving a locked library message. Let me know if you need further assistance.
  3. Export the “iTunes 4 (or the one with a number) Music Library” and “iTunes Music Library.xml” folder and file from your Music/iTunes folder to the computer desktop. Delete the original items from the folder so that you are left only with a folder called “iTunes Music”. Now deploy iTunes.

Solution 1

This usually happens because, somehow the iTunes Library.itl file got set as read only. You can fix this by doing the following steps:

1. Open the My Documents folder.

2. Open the My Music folder.

Genius.itdb

3. Open the iTunes folder

4. Right-click the iTunes Library.itl file and select Properties.

5. Uncheck Read-only.

6. If you have a Security tab, select it. Ensure that your account has Full Control permissions to the file. If you don’t have this tab, ignore this step.

7. Click OK.

Itunes Library Genius.itdb File Is Locked

Now you should be able to start iTunes without the error. If not, your music files may actually be set to where you don’t have proper permissions. Check it with these steps.

1. Navigate to the location where the music files are located. For Windows 7 users, it’s normally in the C:UsersusernameMusiciTunesiTunes Media folder.

2. Right-click the iTunes Media folder, then select Properties.

3. Ensure that the Hidden and Archive boxes aren’t checked. If you have a permissions tab, check to see that you have it set to “Full Control” and that nothing is set to “Deny”.

Solution 2

1. Back up/copy your “locked” iTunes (library files etc).

2. Move “iTunes Library”, “iTunes Library Extras.itdb”, “iTunes Library Genius.itdb” and “iTunes Music Library.xml” out of your “locked” iTunes folder to somewhere safe, you’ll need them again in a sec.

3. Now the only thing in the “locked” iTunes folder will be the “Album Artwork”, “iTunes Music” and “Previous iTunes Libraries” folders.

Itunes Library Genius.itdb File Is Locked Code

4. Create a new “blank” iTunes library, (hold option as you launch iTunes). Select “create library”. Make a new iTunes library elsewhere on your drive. Quit iTunes. You now have a blank iTunes with blank “iTunes Library”, “iTunes Library Extras.itdb”, “iTunes Library Genius.itdb” and “iTunes Music Library.xml” folders which you can put in a folder called “blank”. Keep this in your “Previous iTunes Libraries” folder for when this problem comes around again (which it will).

5. Copy all these blank iTunes files from the “blank” folder into your “locked” iTunes folder.

6. Start iTunes (option-launch to reselect your “locked” iTunes folder). It opens up empty. Quit iTunes.

Itunes Library Extras.itdb File Is Locked

7. Delete the new “blank” files from the “locked” iTunes folder.

8. Copy your old files from your back up folder, into your “locked” iTunes folder.

Library

Itunes Library Genius.itdb File Is Locked Down Today

9. Start iTunes again. Everything should be back to normal!

Code Snippet

This is part of the code I used to automate this process.

Itunes Library Genius.itdb File Is Locked Button

strComputer = “.”

What Is Itunes Library Genius.itdb

Set objWMIService = GetObject(“winmgmts:” & strComputer & “rootcimv2”)
Set objRegistry=GetObject(“winmgmts:” & strComputer & “rootdefault:StdRegProv”)
strKeyPath = “SOFTWAREWow6432NodeMicrosoftWindows NTCurrentVersionProfileList”
objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys
For Each objSubkey In arrSubkeys
on error resume next
strValueName = “ProfileImagePath”
strSubPath = strKeyPath & “” & objSubkey
objRegistry.GetExpandedStringValue HKEY_LOCAL_MACHINE,strSubPath,strValueName,strValue
Const POPUP_TITLE = “User To SID Conversion”
Set objWMIService = GetObject(“winmgmts:” & strComputer & “rootcimv2”)
Set objAccount = objWMIService.Get(“Win32_SID.SID='” & objSubkey & “‘”)
strUser = objAccount.AccountName
‘strDomain = objAccount.ReferencedDomainName’returns referenced domain

Itunes Library Genius.itdb File Is Locked Windows 10

‘DISPLAY PROFILE NAME & SID
objSubkey = trim(objSubkey)’trims whitespace
strUser = trim(strUser)’trims whitespace
‘msgbox “objSubkey: ” & objSubkey’returns SID
‘msgbox strUser’returns username

‘LOGIC TO DETERMINE IF REGISTRY ACCOUNT IS TO BE LOADED
if strUser = “SYSTEM” then strUser=””
if strUser = “LOCAL SERVICE” then strUser=””
if strUser = “NETWORK SERVICE” then strUser=””
‘if strUser = “ADMINISTRATOR” then strUser=””

Itunes Library Genius.itdb File Is Locked Back

if strUser <> “” then
on error resume next

‘prevents the library.itl error from appearing
objShell.Run “%comspec% /c del /q ” & chr(34) & “C:users” & strUser & “MusiciTunesiTunes Library.itl” & chr(34),0,false