From: Hector Santos on
I never tried to nail this down, but maybe someone can provide some
tips here.

I have lots of mapped drives. On this particular (XP) machine I have

D:\bin>ndir
ndir v3.2 (c) copyright 1984-2009 Hector Santos
-- -------- ---------- ------------- -------------
#: Type Total Free Used
-- -------- ---------- ------------- -------------
C: FIXED 2,097 MB 1,569 MB 527 MB
D: FIXED 83,889 MB 61,358 MB 22,531 MB
E: FIXED 51,440 MB 38,900 MB 12,540 MB
F: FIXED 12,628 MB 81,008 MB 31,620 MB
G: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\g$
H: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\h$
J: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\wcImage
K: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\virtualcd
L: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\d$
M: REMOTE 42,952 MB 39,471 MB 3,481 MB \\hdev1\m
N: REMOTE 38,535 MB 36,808 MB 1,726 MB \\hdev1\n
O: REMOTE 38,543 MB 37,806 MB 737 MB \\hdev1\o
P: REMOTE 83,889 MB 61,358 MB 22,531 MB \\hdev21\wcat
T: REMOTE 6,292 MB 1,070 MB 5,221 MB \\hdev1\e$
U: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\localaup
V: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\d$
W: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\aup
X: REMOTE 2,097 MB 1,569 MB 527 MB \\hdev21\c
Z: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\g$
-- -------- ---------- ------------- -------------
Available Drivtters: IQSY

Now, I have a ScanDisk USB flash drive that I use to "sneaknet" some
files. When I insert the USB flash drive, Windows throws the graceful
beep but I don't see it automatically map a drive.

What I have to do is first delete the G: share, so it, I guess, can
pick it the next drive letter, in this case G:. I guess the driver
doesn't have the logic to get the next available like drive I. Since
G: drive is duplicated with other drives, like Z:, I can finish my
task of copying files from Z:.

My Question is:

I want to avoid unmapping drive G: Can I some how map the USB drive
to drive I: manually by using the "Device" name for it?

Under Device Hardware, I can see its part of the Disk Drives hardware
list (with no errors) and its properties show for the Device ID:

USBSTOR\DISK&VEN_SANDISK&PROD_CRUZER_MICRO&REV_0.1\2006077500168F62CD94&0

Is that a device name I can use with NET USE? Or is there some other
"Id" name to use instead?

All I need is a "UNC" or "drive" to copy some files to it.

Thanks In Advance.

---
HLS




--
HLS
From: Hector Santos on
This might be a moot issue now since I used a new Toshiba USB 4GB
flash drive and it was smart enough to find the next available drive I:.

But I would be still be interested in how can this programmatically
done. Before thinking about using this new Toshiba USB I had around,
when I unmapped G: drive and allow Windows (or the ScanDisk driver) to
map to G:, I wrote a quick program using GetLogicalDriveStrings()
and QueryDosDevice() to list the devices and saw it mapped:

G: = \Device\Harddisk2\DP(1)0-0+10 [Removable]

I guess I would have to use DefineDosDevice and/or
SetVolumeMountPoint() to do this programmatically?

Whats the skinny here?

--


Hector Santos wrote:

> I never tried to nail this down, but maybe someone can provide some tips
> here.
>
> I have lots of mapped drives. On this particular (XP) machine I have
>
> D:\bin>ndir
> ndir v3.2 (c) copyright 1984-2009 Hector Santos
> -- -------- ---------- ------------- -------------
> #: Type Total Free Used
> -- -------- ---------- ------------- -------------
> C: FIXED 2,097 MB 1,569 MB 527 MB
> D: FIXED 83,889 MB 61,358 MB 22,531 MB
> E: FIXED 51,440 MB 38,900 MB 12,540 MB
> F: FIXED 12,628 MB 81,008 MB 31,620 MB
> G: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\g$
> H: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\h$
> J: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\wcImage
> K: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\virtualcd
> L: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\d$
> M: REMOTE 42,952 MB 39,471 MB 3,481 MB \\hdev1\m
> N: REMOTE 38,535 MB 36,808 MB 1,726 MB \\hdev1\n
> O: REMOTE 38,543 MB 37,806 MB 737 MB \\hdev1\o
> P: REMOTE 83,889 MB 61,358 MB 22,531 MB \\hdev21\wcat
> T: REMOTE 6,292 MB 1,070 MB 5,221 MB \\hdev1\e$
> U: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\localaup
> V: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\d$
> W: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\aup
> X: REMOTE 2,097 MB 1,569 MB 527 MB \\hdev21\c
> Z: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\g$
> -- -------- ---------- ------------- -------------
> Available Drivtters: IQSY
>
> Now, I have a ScanDisk USB flash drive that I use to "sneaknet" some
> files. When I insert the USB flash drive, Windows throws the graceful
> beep but I don't see it automatically map a drive.
>
> What I have to do is first delete the G: share, so it, I guess, can pick
> it the next drive letter, in this case G:. I guess the driver doesn't
> have the logic to get the next available like drive I. Since G: drive
> is duplicated with other drives, like Z:, I can finish my task of
> copying files from Z:.
>
> My Question is:
>
> I want to avoid unmapping drive G: Can I some how map the USB drive to
> drive I: manually by using the "Device" name for it?
>
> Under Device Hardware, I can see its part of the Disk Drives hardware
> list (with no errors) and its properties show for the Device ID:
>
> USBSTOR\DISK&VEN_SANDISK&PROD_CRUZER_MICRO&REV_0.1\2006077500168F62CD94&0
>
> Is that a device name I can use with NET USE? Or is there some other
> "Id" name to use instead?
>
> All I need is a "UNC" or "drive" to copy some files to it.
>
> Thanks In Advance.
>
> ---
> HLS
>
>
>
>



--
HLS
From: Pavel A. on
Mount them to a folder on NTFS disk, using the Disk manager
or mountvol command,
or this: http://www.uwe-sieber.de/usbdlm_e.html

Network drives can be "mounted" into a local folder as well,
using _symbolic links_.

--pa



"Hector Santos" <sant9442(a)nospam.gmail.com> wrote in message
news:eM$1NEioKHA.1556(a)TK2MSFTNGP05.phx.gbl...
> This might be a moot issue now since I used a new Toshiba USB 4GB flash
> drive and it was smart enough to find the next available drive I:.
>
> But I would be still be interested in how can this programmatically done.
> Before thinking about using this new Toshiba USB I had around, when I
> unmapped G: drive and allow Windows (or the ScanDisk driver) to map to G:,
> I wrote a quick program using GetLogicalDriveStrings() and
> QueryDosDevice() to list the devices and saw it mapped:
>
> G: = \Device\Harddisk2\DP(1)0-0+10 [Removable]
>
> I guess I would have to use DefineDosDevice and/or SetVolumeMountPoint()
> to do this programmatically?
>
> Whats the skinny here?
>
> --
>
>
> Hector Santos wrote:
>
>> I never tried to nail this down, but maybe someone can provide some tips
>> here.
>>
>> I have lots of mapped drives. On this particular (XP) machine I have
>>
>> D:\bin>ndir
>> ndir v3.2 (c) copyright 1984-2009 Hector Santos
>> -- -------- ---------- ------------- -------------
>> #: Type Total Free Used
>> -- -------- ---------- ------------- -------------
>> C: FIXED 2,097 MB 1,569 MB 527 MB
>> D: FIXED 83,889 MB 61,358 MB 22,531 MB
>> E: FIXED 51,440 MB 38,900 MB 12,540 MB
>> F: FIXED 12,628 MB 81,008 MB 31,620 MB
>> G: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\g$
>> H: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\h$
>> J: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\wcImage
>> K: REMOTE 53,085 MB 47,339 MB 5,746 MB \\hdev1\virtualcd
>> L: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\d$
>> M: REMOTE 42,952 MB 39,471 MB 3,481 MB \\hdev1\m
>> N: REMOTE 38,535 MB 36,808 MB 1,726 MB \\hdev1\n
>> O: REMOTE 38,543 MB 37,806 MB 737 MB \\hdev1\o
>> P: REMOTE 83,889 MB 61,358 MB 22,531 MB \\hdev21\wcat
>> T: REMOTE 6,292 MB 1,070 MB 5,221 MB \\hdev1\e$
>> U: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\localaup
>> V: REMOTE 11,572 MB 958 MB 10,614 MB \\hdev1\d$
>> W: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\aup
>> X: REMOTE 2,097 MB 1,569 MB 527 MB \\hdev21\c
>> Z: REMOTE 104,855 MB 30,777 MB 74,077 MB \\hdev1\g$
>> -- -------- ---------- ------------- -------------
>> Available Drivtters: IQSY
>>
>> Now, I have a ScanDisk USB flash drive that I use to "sneaknet" some
>> files. When I insert the USB flash drive, Windows throws the graceful
>> beep but I don't see it automatically map a drive.
>>
>> What I have to do is first delete the G: share, so it, I guess, can pick
>> it the next drive letter, in this case G:. I guess the driver doesn't
>> have the logic to get the next available like drive I. Since G: drive is
>> duplicated with other drives, like Z:, I can finish my task of copying
>> files from Z:.
>>
>> My Question is:
>>
>> I want to avoid unmapping drive G: Can I some how map the USB drive to
>> drive I: manually by using the "Device" name for it?
>>
>> Under Device Hardware, I can see its part of the Disk Drives hardware
>> list (with no errors) and its properties show for the Device ID:
>>
>> USBSTOR\DISK&VEN_SANDISK&PROD_CRUZER_MICRO&REV_0.1\2006077500168F62CD94&0
>>
>> Is that a device name I can use with NET USE? Or is there some other
>> "Id" name to use instead?
>>
>> All I need is a "UNC" or "drive" to copy some files to it.
>>
>> Thanks In Advance.
>>
>> ---
>> HLS
>>
>>
>>
>>
>
>
>
> --
> HLS