LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect USB Flash Drive name in LabVIEW

Hi there

I was looking for how to detect a USB Flash Drive name in Labview

appearently every time i insert USB Flash Drive in a computer, windows assign it a different name

once "J:" and sometimes "M:"

Is there anyway to obtain USB Flash Drive name programmatically in Labview ?

Because in my program an user shouldn't be able to access HDD Drives except his USB Flash Drive (for inserting some file ...)

thank you and excuse me for my poor english 

0 Kudos
Message 1 of 8
(4,980 Views)

This question has been asked before several times. Did you try a search? http://forums.ni.com/t5/forums/searchpage/tab/message?filter=location&location=Board%3A170&q=detect+...

 

Try the solutions/suggestions already posted. If they don't work then you can come back and indicate why they are not adequate.

0 Kudos
Message 2 of 8
(4,974 Views)

Thank you about the link but they don't work
I still have the problem
Is there any Windows API based solution?
or anything else ?

0 Kudos
Message 3 of 8
(4,950 Views)

What is wronge with these VIs ?

http://webspace.webring.com/people/og/gtoolbox/dl/DeviceMonitor.zip

I can not load it in LV2010. Why ?

I think this VI could be solution of my problem

Please help 

0 Kudos
Message 4 of 8
(4,936 Views)

.llb loading error.JPG

 

I was able to get the demo.vi to load, but it could not load the other two because there is no block diagram associated with those.  I'm not sure why this is.  I haven't had any issues with other llbs before.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 8
(4,920 Views)

I just came across the same error message from a different thread that explains it.

 

http://forums.ni.com/t5/LabVIEW/G-Toolbox-for-LabVIEW-8-6/td-p/840513/page/2

 

 

 

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 6 of 8
(4,915 Views)

Finally found the solution

By looking at MSDN. There is a function named "GetDriveTypeA" in Kernel32

Here is the program. It finds USB Flash Drive letter or else leaves it empty

Message 7 of 8
(4,870 Views)

Here is a LLB that does more.

Tim
GHSP
Message 8 of 8
(4,864 Views)