Command Lines unmap/ map local partitions

Discussion in 'Perl Misc' started by Dave, Feb 6, 2004.

  1. Dave

    Dave Guest

    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
     
    Dave, Feb 6, 2004
    #1
    1. Advertising

  2. Dave

    Matt Garrish Guest

    "Dave" <-state.edu> wrote in message
    news:...
    > 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
     
    Matt Garrish, Feb 6, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    1,258
    Roedy Green
    Sep 5, 2005
  2. Replies:
    11
    Views:
    6,445
    Luc The Perverse
    Nov 19, 2005
  3. Frank Bechmann
    Replies:
    3
    Views:
    345
    Frank Bechmann
    Nov 9, 2003
  4. Steve
    Replies:
    7
    Views:
    349
    Anton Vredegoor
    Apr 30, 2004
  5. Nick J Chackowsky

    Partitions of an integer

    Nick J Chackowsky, Jul 24, 2004, in forum: Python
    Replies:
    5
    Views:
    570
    Damien Wyart
    Jul 26, 2004
Loading...

Share This Page