Please test this small windows app
I have written a small application to accurately detect the iPod drive. I know many programmers have resorted to just looking for the itunesdb on each drive. This method may be subverted if someone has a backup of their entire iPod on a different drive.
This app written in vb6 uses WMI to detect a drive made by apple, it then get's the drive letter for this drive and verifies the itunesdb resides upon it.
Why would you want to help me? Because if you do I will make the code freely available in vb6 and .net to anyone who wants to use it.
Requirements:
WMI is installed by default on all ME, 2000, XP and 2003 windows machines. If you are using 95, 98 or NT you will need to verify WMI is installed before using.
The VB 6 runtime is also required. The VB 6 runtime is installed by default on all 2000, XP and 2003 (and possibly ME) windows machines. If you are using 95, 98, NT or ME you should verify the vb6 runtime is installed before using.
The downloads can be found here:
WMI
http://www.microsoft.com/downloads/details.aspx?familyid=afe41f46-e213-4cbf-9c5b-fbf236e0e875&languageid=f49e8428-7071-4979-8a67-3cffcb0c2524&displaylang=en
VB6 runtime
http://download.microsoft.com/download/vb60pro/Redist/sp5/WIN98Me/EN-US/vbrun60sp5.exe
Caveats:
Theoretically this app should not cause any damage to any system. It does not attempt to write any files, copy any data or manage any hardware. With that said I have run this successfully on several machines without a hiccup, but I cannot be responsible if it causes any errors.
Download it:
http://www.ericneff.com/iPodUtilities/iPodLocator.zip (5 kb)
or
http://www.ericneff.com/iPodUtilities/iPodLocator.exe (24kb)
Please let me know how this works for you. I have included error handling in the app and the error will be presented in a text box for easy copying so you can reply it back to me.
Thanks in advance for reading this, and extra thanks if you can help me out.
[2055 byte] By [
cheddar] at [2007-11-9 19:45:00]

# 1 Re: Please test this small windows app
windows xp sp1
3 G ipod 10GB via FW
iPod found at drive J:
is ok.
# 2 Re: Please test this small windows app
sweet grimmet, thank you very much.
# 3 Re: Please test this small windows app
It didn't work for me. I'm running Windows Server 2003 and the iPod designated as drive letter I, does not appear in My Computer, yet if you manually type I:\ into the address bar, you can access the hard drive.
So this isn't a problem with your software.
br- at 2007-11-15 17:20:20 >

# 4 Re: Please test this small windows app
Originally posted by br-
It didn't work for me. I'm running Windows Server 2003 and the iPod designated as drive letter I, does not appear in My Computer, yet if you manually type I:\ into the address bar, you can access the hard drive.
So this isn't a problem with your software. are you able to use itunes with it? or any other software?
# 5 Re: Please test this small windows app
iTunes works with the drive both when it appears in My Computer and when it doesn't appear in My Computer.
br- at 2007-11-15 17:22:25 >

# 6 Re: Please test this small windows app
Originally posted by br-
iTunes works with the drive both when it appears in My Computer and when it doesn't appear in My Computer. That is interesting. I don't know if I am ever going to be able to compete with that unless they let me in on their secrets.
Thanks again. I appreciate your taking the time to help me out.
# 7 Re: Please test this small windows app
No problem. Let me know if you want any other testing done. I'd be glad to help out.
br- at 2007-11-15 17:24:28 >

# 8 Re: Please test this small windows app
Works for me! (3G 20GB/WinXP/Firewire)
One question though, when enumerating all the drives is it worth checking drives A & B, surely they're reserved for floppys? It just makes the program a less elegant if it's making the FD drive make it's funny noises... just my opinion.
Also could br-'s problem be that he hasn't enabled disk access? because surely it won't mount as a normal drive if he hasn't?
# 9 Re: Please test this small windows app
I think when it's used, it will not check a: and b:
as for br's problem, it is enabled as drive, but some policy or something is there to make it a hidden drive. it can be accessed but not seen...
# 10 Re: Please test this small windows app
Originally posted by Struddie
Works for me! (3G 20GB/WinXP/Firewire)
One question though, when enumerating all the drives is it worth checking drives A & B, surely they're reserved for floppys? It just makes the program a less elegant if it's making the FD drive make it's funny noises... just my opinion.
Also could br-'s problem be that he hasn't enabled disk access? because surely it won't mount as a normal drive if he hasn't? Yeah the first thing this code does is look for drives that are "Removable media bu8t not floppy" and it does this by not actually scanning the drive, but by getting the system definitions for the drives from WMI.
Thanks for testing it. I am pleased to hear it worked for you.
# 11 Re: Please test this small windows app
iPod found at drive H:
Works fine for me - 3G firewire iPod on Windows XP SP 1.
Good job.
Edano at 2007-11-15 17:28:29 >

# 12 Re: Please test this small windows app
Great! Thank you very much Edano!
# 13 Re: Please test this small windows app
Hey, the code doesn't work with the new update! I tested it, and the problem is in the LogicalDiskToPartition WMI objects, which doesn't have the iPod drive in it anymore. This may just be my computer.. but I think it's the 2.2 update, coz it worked fine before...
# 14 Re: Please test this small windows app
iPod found at drive F:
using stuff in my sig :)
im kinda confused tho - whats the purpose of this?
smerko at 2007-11-15 17:31:35 >

# 15 Re: Please test this small windows app
Originally posted by smerko
iPod found at drive F:
using stuff in my sig :)
im kinda confused tho - whats the purpose of this?
The purpose of this is to make this code available to other programmers so they can have an accurate way to detect the ipod. Alot of people just try and find the itunesdb file and use it. This can be troublesome if someone has made a backup of their iPod. This app uses system information to find the ipod and only verifies the presence of the itunesdb file after it thinks it has found the drive.
Thanks for testing it.
# 16 Re: Please test this small windows app
Originally posted by EvilDude
Hey, the code doesn't work with the new update! I tested it, and the problem is in the LogicalDiskToPartition WMI objects, which doesn't have the iPod drive in it anymore. This may just be my computer.. but I think it's the 2.2 update, coz it worked fine before...
hmmmm. I'll look at this today. 2.2 seems to be just full of problems doesn't it.
# 17 Re: Please test this small windows app
ah right i get it now. btw my ipod had the 2.2 software installed when i tried your app and it still worked fine.
smerko at 2007-11-15 17:34:40 >

# 18 Re: Please test this small windows app
In a follow up to EvilDude's post. I have tested this on 2 machines with a 2.2 v iPod. He has since gotten his to work as well (although not sure how)
# 19 Re: Please test this small windows app
I think it might be because I didn't reboot after firmware update (for some reason, it wanted to reboot after installing the firmware on the computer...and i was like no.) so that probably explains it. It's working fine now, and hope that no more random errors for me :)
# 20 Re: Please test this small windows app
The easiest and fastest way in any Windows programming language to find an iPod drive is simply loop through all drive letters (ASCII characters 97 through 122), and then see if the path \iPod_Control exists on that drive letter. :D
# 21 Re: Please test this small windows app
Originally posted by kainjow
The easiest and fastest way in any Windows programming language to find an iPod drive is simply loop through all drive letters (ASCII characters 97 through 122), and then see if the path \iPod_Control exists on that drive letter. :D
And if someone made a backup of their iPod_Control folder we would just use that instead? Most likely a removable drive would have a letter before the ipod and would be selected first. The funny thing is iTunes wont fall for this trick so I think I shouldn't either. Well it all comes down to it, what I have done here wasn't much more difficult than what you describe, it just takes the extra steps to verify that it is indeed looking at an iPod and not a backup.