Re: Map network drive for user using VB/ASP.NET
- From: kimiraikkonen <kimiraikkonen85@xxxxxxxxx>
- Date: Sun, 29 Jun 2008 15:17:33 -0700 (PDT)
On Jun 30, 1:09 am, kimiraikkonen <kimiraikkone...@xxxxxxxxx> wrote:
On Jun 29, 11:42 pm, Brian Nicholson
<BrianNichol...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello,
I'm trying to create an admin page that can run miscellaneous scripts for
our IT department. Currently, I'm trying to create a script that can map a
network drive for a user (e.g. a form where I can input \\path\folder, drive
letter, and domain\user). Is this possible? If so, can someone point me in
the right direction?
Thank you,
Brian Nicholson
Hi,
If you're meaning to transfer files across computers that are on the
same network, you can simply use it by calling mapped computer's name
with UNC path or network IP address:
My.Computer.Network.DownloadFile("\\MAPPED_PC\folder\file.exe",c:
\file.exe")
Additionaly, you need to set networkCredentials parameter if your
drives require network authentecation.
Hope this helps,
Onur Güzel
However you can do it also with System.IO.File.Copy using UNC
and, correcting my previous syntax as:
My.Computer.Network.DownloadFile("\\MAPPEDPC\\file.exe","c:\file.exe")
or one of System.IO.File's methods to work with your mapped drive on
domain / workgroups using proper credentials.
HTH,
Onur G.
.
- References:
- Re: Map network drive for user using VB/ASP.NET
- From: kimiraikkonen
- Re: Map network drive for user using VB/ASP.NET
- Prev by Date: Re: Map network drive for user using VB/ASP.NET
- Next by Date: Is anyone able to make My.Settings work? I can't!
- Previous by thread: Re: Map network drive for user using VB/ASP.NET
- Next by thread: Re: Map network drive for user using VB/ASP.NET
- Index(es):
Relevant Pages
|