| View previous topic :: View next topic |
| Author |
Message |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri May 06, 2005 8:16 pm Post subject: [VDS5] Removable Drives Questions |
|
|
I'm not so much trying to determine what are removable drives, but
what I am currently doing is trying to determine which drive is an iPod
Mini drive. At this time, I check all drives for a specific directory and
file since it will only exists on the iPod Mini drive, but the problem is, when
I hit other removable drives that are listed, but not actually there, I get
error messages from XP stating that the drive isn't there. It doesn't cause
any trouble for my program, but it is annoying to have to click a button
each time to bypass these dialogs from Windows.
What's happening is that since these drives are not there, trying to check
for the dir and file fails in Windows. These are like Flash drives etc.
Here's the code I'm currently using.
| Code: | %A = 67
REPEAT
IF @greater(@file(@chr(%A)":\iPod_Control\Device\SysInfo",Z),0)
%B = @chr(%A)":\"
END
%A = @succ(%A)
UNTIL %B@greater(%A,90)
IF @null(%B)
WARN "iPod Mini not found!"
EXIT
END |
What I would rather do, but am unable to implement, is to use the
drives manufacture name, not their Volume name or Serial numbers,
because those will not be the same for each iPod Mini drive.
The manufacture names go something like this.
My C: HD is "SAMSUNG SP 1203N", my iPod Mini is "Apple iPod
USB Device" and my CD drive is "LITE-ON DVD+RW SOHW-802S".
I have scoured the registry trying to find a way to use the registry to
do this, but am not able to find anything definitive. I can find entries
for the harddrives and even the removables, but the problem is, I can't
seem to find updated info and relate the info to actual drive letters.
I've searched the forum here to try and find anything related, but either
my search criteria is not good enough, or there is no info on this subject.
Any insight or help is greatly appreciated.
Thanks in advance,
-Garrett |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat May 07, 2005 8:15 am Post subject: |
|
|
Dunno if it helps, but this is the code I used in my anti-virus project to populate the drive selection box with a list of valid drives without causing an error:
| Code: | list create,6
dialog cursor,wait
%C = 65
repeat
%D = @volinfo(@chr(%C),T)
if %D
list add,6,@chr(%C):\
end
%C = @succ(%C)
until @equal(%C,90)
|
_________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu May 12, 2005 5:39 pm Post subject: |
|
|
Thanks Jules, but not what I was looking for, though that code is better
than what I have up there.
-Garrett |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|