.Net mapping Network Drives

Discussion in 'ASP .Net' started by David Stratton, Jan 21, 2004.

  1. I am trying to determine how to map network drives with .net. Here's a
    little background:

    I work at a helpdesk in the retail industry. I currently have an
    application that uses the Windows Script Host (vbscript if it matters) that
    monitors our store's cash registers for a potential problem. Our cash
    registers are supposed to continually send sales information over the a back
    office computer real-time. Every so often, the cash registers stop
    communicating with the back office PC. When this happens, there is a
    temporary journal file that grows in size with each transaction.

    The script that I use maps a network drive to the C: drive of each register
    (using the i.p address i.e. \\192.168.1.1\C$) and uses the Windows username
    and password set up in the registers. The script then checks the size of
    the cache file, and if it finds a cache file that is over a certain file
    size, it alerts us so we can troubleshoot the problem. Once the file size,
    is checked, the drive is disconnected, so that the drive letter can be used
    for the next cash register.

    We are migrating amour applications to .Net, and I am looking for a .Net
    solution to this. I've been through the MSDN documentation of the .Net
    framework, and have not found anything that references mapping and
    disconnecting Network Drives. If someone can point me to the right
    documentation, I should be able to take it from there. Thanks in advance!
     
    David Stratton, Jan 21, 2004
    #1
    1. Advertising

  2. David Stratton

    Chris Taylor Guest

    Hi,

    ..NET does not provide functionality to map and unmap network resources. You
    can either execute the script files or you can use interop to access the
    WNet* api functions, the following post should get you started with this
    approach.

    TinyURL:
    http://tinyurl.com/2addz

    Original URL:
    http://groups.google.com/groups?hl=...&oe=UTF-8&q=chris_taylor_za+wnetaddconnection

    Hope this helps

    --
    Chris Taylor
    http://dotnetjunkies.com/WebLog/chris.taylor/
    "David Stratton" <> wrote in message
    news:%...
    > I am trying to determine how to map network drives with .net. Here's a
    > little background:
    >
    > I work at a helpdesk in the retail industry. I currently have an
    > application that uses the Windows Script Host (vbscript if it matters)

    that
    > monitors our store's cash registers for a potential problem. Our cash
    > registers are supposed to continually send sales information over the a

    back
    > office computer real-time. Every so often, the cash registers stop
    > communicating with the back office PC. When this happens, there is a
    > temporary journal file that grows in size with each transaction.
    >
    > The script that I use maps a network drive to the C: drive of each

    register
    > (using the i.p address i.e. \\192.168.1.1\C$) and uses the Windows

    username
    > and password set up in the registers. The script then checks the size of
    > the cache file, and if it finds a cache file that is over a certain file
    > size, it alerts us so we can troubleshoot the problem. Once the file

    size,
    > is checked, the drive is disconnected, so that the drive letter can be

    used
    > for the next cash register.
    >
    > We are migrating amour applications to .Net, and I am looking for a .Net
    > solution to this. I've been through the MSDN documentation of the .Net
    > framework, and have not found anything that references mapping and
    > disconnecting Network Drives. If someone can point me to the right
    > documentation, I should be able to take it from there. Thanks in advance!
    >
    >
     
    Chris Taylor, Jan 21, 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. Jonas
    Replies:
    4
    Views:
    986
  2. =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=

    Enumerate all the drives including Mapped network drives on a serv

    =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=, Feb 25, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,061
    =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=
    Feb 26, 2005
  3. kalbee
    Replies:
    2
    Views:
    388
    steph
    Oct 12, 2004
  4. Joe
    Replies:
    2
    Views:
    305
    Bob Ippolito
    Mar 3, 2004
  5. Tuure Laurinolli

    IDLE; Pythonwin and windows network drives

    Tuure Laurinolli, Jul 1, 2004, in forum: Python
    Replies:
    3
    Views:
    403
    David Fraser
    Jul 1, 2004
Loading...

Share This Page