I recently came across a problem on a Windows 7 64bit laptop where Apple's iTunes was failing to recognise a connected iPhone. It was giving a error that the wrong version of iTunes was installed and I should install the 64bit version of iTunes. As I had no idea how what had been performed up until this point I performed a full uninstall of iTunes. I then downloaded the latest version of iTunes 10.5.1 and ran through the installer. At one point during the install I noticed the install gave the message 'Rolling back action' and thought to myself this cannot be good.
At the end iTunes indicated it had a problem installing and I should try again. The weird thing is if you didn't pay attention to the message you could quite easily click on ok and iTunes will work except it'll fail to recognise any iPod, iPhone or iPad device. To help identify what actually failed to install I checked the windows services management console and found the Apple Mobile Device Service was missing. This makes sense because it's that service which communicates with the iPhone. The question is why was the Apple Mobile Device Service (AMDS) failing to install?
To find out I needed to capture a log file of the install process. A bit of research helped me identify that the iTunes64Setup.exe contained 5 separate windows installer files:
I needed to extract AppleMobileDeviceSupport64.msi from iTunes64Setup.exe so I could generate a install log. The solution is to install WinRAR which you can download here http://rarlab.com/download.htm. After extracting AppleMobileDeviceSupport64.msi to c:\temp (you can use any folder you like here) I opened a command prompt and issued these commands:
msiexec -i AppleMobileDeviceSupport64.msi -log AMDS.log
This will attempt to install the AMDS and generate an installation log c:\temp\AMDS.log. Looking through the log I found the install failed because the format of C:\Windows\System32\DriverStore\FileRepository\netaapl64.inf_amd64_neutral_dc2cbd989eec1514\netaapl64.inf was invalid. I opened the file in question and found it to be completely blank. I coulnd't just delete the files in question because they are protected by the Windows operating system, and anyway the correct method to remove a driver package from the driver store is to use the pnputil.exe tool. However if the driver package didn't complete installation in the first place then it may not work, but it was always worth a try.
To use pnputil I needed to run a command prompt as an administrator. I Clicked Start, All Programs, and Accessories, then right-click Command Prompt, and then click Run as Administrator. From the command prompt type I typed in pnputil.exe -e. This produced a list of installed driver packages. Looking through the list I was looking for something like this:
Published name : oem30.inf Driver package provider : Apple Class : Network adapters Driver date and version : 07/12/2011 184.108.40.206 Signer name : Microsoft Windows Hardware Compatibility Publisher
This is the Apple network adapter driver. The important information here is the Published name oem30.inf. To uninstall the driver use the command pnputil -d oem30.inf (replace oem30.inf with the correct published name for your PC). After this try and the install again: msiexec -i AppleMobileDeviceSupport64.msi -log AMDS.log. If this fails or as in my case the driver package doesn't show in the list of installed drivers you'll need to take more drastic (and potentially dangerous to your PC's health!) measures.
By default the files in the driver repository are read only and can only be modified by the Windows Operating System, and this is for a good reason. I needed to change the permissions on the driver package so I could delete the corrupt files. Caution proceed at your own risk, make a mistake here and your computer may stop working and a system restore or rebuild may be required.
The first thing I needed to do was to take ownership of the folder so I could change the permissions. From windows explorer I clicked on Folder and search options under the organize button. Next I clicked the view tab and clicked on Show hidden files, folders, and drives. By unticking hide extensions for known file types and unticking Hide protected operating system files I was able to view the files I needed to remove. From the windows explorer window I browsed to browse to C:\Windows\System32\DriverStore\FileRepository\, which was now visible and right clicked the netaapl64.inf_amd64_neutral_dc2cbd989eec1514 folder and selected properties. I clicked the security tab and then the Advanced button. Under Advanced I clicked the Owner tab and then clicked the Edit button. From the change owner to: box I selected my username, and then ticked Replace owner on subcontainers and objects and clicked OK to set the changes.
Next I gave myself Full Control to the folder and files. Back on the Security tab I clicked the Edit button, and with Everyone highlighted in the Groups or user names I ticked full control in the Allow column. I clicked OK and accepted the warning message Windows presents about security and access problems. At this point I could delete the contents of the netaapl64.inf_amd64_neutral_dc2cbd989eec1514 folder.
I tried re-installing the Apple Mobile Device Service (AMDS) using msiexec -i AppleMobileDeviceSupport64.msi -log AMDS.log command and I no longer got the Rolling back action error. All that I had left to do now was install iTunes again and the iPhone was now recognized when I connected it to the PC.
- Devices (1)
- ICT (2)
- Cloud Computing (2)
- IT Support (48)
- Cisco (4)
- Database (10)
- Gnucash (1)
- Messaging (7)
- Microsoft Office (5)
- Networking (2)
- Operating Systems (18)
- Printer (1)
- Scripting (6)
- Trend Micro Anti Virus (2)
- Virtual Servers (2)
- Web Browsers (6)
- Site News (2)
- Software Development (10)
- Web Development (5)