Re: Map network drive for user using VB/ASP.NET

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.
.



Relevant Pages

  • Re: usernameguest password prompt
    ... 1.When attempting to map a network drive from any xp pro machine on my ... This then resulted in this message when attempting to map a network drive" ... you cannot map network drives from a XP pro machine to a XP home one.I ...
    (microsoft.public.windowsxp.network_web)
  • Re: usernameguest password prompt
    ... 1.When attempting to map a network drive from any xp pro machine on my ... This then resulted in this message when attempting to map a network drive" ... you cannot map network drives from a XP pro machine to a XP home one.I ...
    (microsoft.public.windowsxp.network_web)
  • Re: USE MACRO TO SAVE WORKSHEET SELECTING FILENAME FROM CELLS
    ... By using a UNC path you're specifying directly where on the network a file you should be saved - rather than relying on the drive mapping. ... You don't really need want to occupy too much of the user's screen real estate and to be tidy, you should hide or delete them when you close or deactivate your workbook - that's a bit of fathing around for no real gain in this instance. ... that could take a while to scour all the available drives. ...
    (microsoft.public.excel.programming)
  • Re: Unable to map to remote share XP Pro --> XP Pro
    ... I can now map network drives as long as the PCs are ... the domain and the PDC is online I can map drives without issue. ... I have encountered exactly the same problem after updating to SP3. ...
    (microsoft.public.windowsxp.network_web)
  • Re: usernameguest password prompt
    ... Home.I share all drives to all four machines.My problem is with the XP home machine.I can seemy shared drives from the XP home to any xp pro but none of the xp pro machines will map any network drive back to the XP home machine.I simple get the password box with ... Make sure that the Guest account is enabled for access by other ... computers over the network: ... Well,tried that but it then resulted in this prompt when trying to map drive from the xp pro to xp home machine. ...
    (microsoft.public.windowsxp.network_web)