Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Command Lines unmap/ map local partitions

Reply
Thread Tools

Command Lines unmap/ map local partitions

 
 
Dave
Guest
Posts: n/a
 
      02-06-2004
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
 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      02-06-2004

"Dave" <(E-Mail Removed)-state.edu> wrote in message
news:(E-Mail Removed) om...
> 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\Current Version\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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to know two lines are a pare parallel lines lovecreatesbeauty C Programming 11 04-28-2006 03:32 AM
How to display a string in many lines, each lines have a specified length thuyptt@dsp.com.vn C++ 1 12-06-2005 07:26 AM
Asp.Net Calender, how to display 5 lines if there are only 5 lines in one month? Jack ASP .Net 9 10-12-2005 03:44 AM
Modems, Analog Lines and ... Electrical Lines? Sens Fan Happy In Ohio Computer Support 5 09-02-2004 04:15 AM
Re: how to read 10 lines from a 200 lines file and write to a new file?? Joe Wright C Programming 0 07-27-2003 08:50 PM



Advertisments