473,513 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Zip Drive

How I can I determine if a drive is a zip drive.

TIA
Nov 20 '05 #1
3 1401
Hi,

The wmi win32_logicaldisk class has information about the drives.
There is no clear zip drive property but take a look at the drive type,
Caption, Description, and PNPDeviceID. Add a reference to system.management
for to use the wmi. Hope this helps.

http://msdn.microsoft.com/library/de...ogicaldisk.asp

Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_LogicalDisk")

moReturn = moSearch.Get

For Each mo In moReturn

Dim strOut As String

strOut = String.Format("Drive {0} - Drive Type {1}", mo("Name"),
mo("DriveType"))

Trace.WriteLine(strOut)

Next

Ken

--------------------

"Lespaul36" <le*******@none.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How I can I determine if a drive is a zip drive.

TIA

Nov 20 '05 #2
I tried that, but it throws an error. I am thinking that mabe it is because
it is an old LPT one.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:eo*************@TK2MSFTNGP10.phx.gbl...
Hi,

The wmi win32_logicaldisk class has information about the drives.
There is no clear zip drive property but take a look at the drive type,
Caption, Description, and PNPDeviceID. Add a reference to system.management for to use the wmi. Hope this helps.

http://msdn.microsoft.com/library/de...ogicaldisk.asp
Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_LogicalDisk")

moReturn = moSearch.Get

For Each mo In moReturn

Dim strOut As String

strOut = String.Format("Drive {0} - Drive Type {1}", mo("Name"),
mo("DriveType"))

Trace.WriteLine(strOut)

Next

Ken

--------------------

"Lespaul36" <le*******@none.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How I can I determine if a drive is a zip drive.

TIA


Nov 20 '05 #3
It isn't really an error from win32_logicaldisk, it was a handling error,
but the response comes back blank for pnpdeviceid. I can find the drive,
but it is a matter of gettng the caption for it. I have it saying
"Removable Drive" from using the FileSystemObject. I found that if I search
through some of the explorer registry keys I can sometimes get the name, but
it is iffy.

It would be nice if I could do it for multiple os versions.

<le*******@none.net> wrote in message
news:Ok**************@TK2MSFTNGP11.phx.gbl...
I tried that, but it throws an error. I am thinking that mabe it is because it is an old LPT one.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:eo*************@TK2MSFTNGP10.phx.gbl...
Hi,

The wmi win32_logicaldisk class has information about the drives. There is no clear zip drive property but take a look at the drive type,
Caption, Description, and PNPDeviceID. Add a reference to

system.management
for to use the wmi. Hope this helps.

http://msdn.microsoft.com/library/de...ogicaldisk.asp

Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_LogicalDisk")

moReturn = moSearch.Get

For Each mo In moReturn

Dim strOut As String

strOut = String.Format("Drive {0} - Drive Type {1}", mo("Name"),
mo("DriveType"))

Trace.WriteLine(strOut)

Next

Ken

--------------------

"Lespaul36" <le*******@none.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How I can I determine if a drive is a zip drive.

TIA



Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1897
by: GregT | last post by:
I program in C#. Is there a way to determine which of the local machine's logical drives are associated with CD drive(s)?
2
5769
by: giloosh99 | last post by:
Hello, Im grabbing tables via VB code using visual foxpro ODBC drives. The tables directory is in a mapped network drive. The code works fine and does the job, however if the computer is idle for...
1
3392
by: Max Baki via .NET 247 | last post by:
I all, i've write a sample ftp Windows service which download files and copy them on remote share or remote mapped drive (the service works fine on local drives). This part of code is the...
7
24122
by: jimdscudder | last post by:
How can I use WMI or a WqlObjectQuery to find the hard drive letter of the physical drive location index. For example the following code will give me the physical drive location:...
5
4447
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
3
10564
by: James N | last post by:
My ASP.NET application needs read/write permissions for drive "Z:", which is mapped to my Linksys Gigadrive (Network Attached Storage...if anyone is familiar with that). If I configure the...
2
8170
by: Kavitha | last post by:
Hi , Can any one tel me how to create a virtual drive in C#( similar to Gmail Virtual drive).Also tell me what interfaces could be used to create the same. Thanks in Advance Kavitha
4
9124
by: Luc The Perverse | last post by:
Hi - I have very little C# programming experience. I am making a software product which calls for an interface almost identical to Windows Explorer - and I wondered if mounting a "virtual drive"...
3
3064
by: Killer42 | last post by:
Hi all. Summary Plugging flash drive into work PC, no drive appears. Details First of all, I have searched TheScripts for an answer. The closest I found was this article which covered...
23
3715
by: Rotsey | last post by:
Hi, I am writing an app that scans hard drives and logs info about every fine on the drive. The first iteration of my code used a class and a generic list to store the data and rhis took...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.