Command Lines unmap/ map local partitions

D

Dave

Under local disk manager which is located under Control Panel >
Administrative Tools > Computer Management, it's possible to choose
whether a partition is mapped to a local drive letter or not. I'm
trying to find a way to script this using DOS batch scripting,
vbscript, or perl. What I want to do is load a disk image to a local
partition on a laptop, then unmap the drive letter from the partition
so that regular users can't see it. Also, the 'net use' command
that's used for mapping network shares to a drive letter won't work
for this application, as far as I know. Can anybody help me out?

-Dave
 
M

Matt Garrish

Dave said:
Under local disk manager which is located under Control Panel >
Administrative Tools > Computer Management, it's possible to choose
whether a partition is mapped to a local drive letter or not. I'm
trying to find a way to script this using DOS batch scripting,
vbscript, or perl. What I want to do is load a disk image to a local
partition on a laptop, then unmap the drive letter from the partition
so that regular users can't see it. Also, the 'net use' command
that's used for mapping network shares to a drive letter won't work
for this application, as far as I know. Can anybody help me out?

You can hide drives from the My Computer windows via the registry (at least
it sounds like that's what you're trying to accomplish).

HKEY_LOCAL_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Just add a dword value NoDrives with the appropriate value for the drive you
want to hide ( a=1, b=2, c=4, d=8, etc.). Of course, this setting will only
take effect the next time the person logs on. If you want the drive to be
hidden as soon as your script is executed, well you've got me there...

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top