ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Map Network Drive (https://www.excelbanter.com/excel-discussion-misc-queries/216165-map-network-drive.html)

leerem

Map Network Drive
 
Hi All,
I need to Map Network to 12 different sites PC's ,around the
country. At present I'm doing this manually and after my routine has run I
manually Disconnect from each site otherwise it slows down the PC, especailly
when opening or closing a workbook.
Can this be done programatically. for example I have a site in say belfast
whose ID No. is \\bft-123456w\d$ D drive being the drive in question that
needs to be accessed. on some of the sites this also requires a User name and
Password. Does anyone have and idea on how the code should be written to
accomplish this.

Many regards
Lee


Gary''s Student

Map Network Drive
 
Create a file called leerem.bat containing the following three lines:

net use d: /delete /y
net use d: "\\bft-123456w\d$" /PERSISTENT:yes
pause

Then execute the .bat file
--
Gary''s Student - gsnu200826


"leerem" wrote:

Hi All,
I need to Map Network to 12 different sites PC's ,around the
country. At present I'm doing this manually and after my routine has run I
manually Disconnect from each site otherwise it slows down the PC, especailly
when opening or closing a workbook.
Can this be done programatically. for example I have a site in say belfast
whose ID No. is \\bft-123456w\d$ D drive being the drive in question that
needs to be accessed. on some of the sites this also requires a User name and
Password. Does anyone have and idea on how the code should be written to
accomplish this.

Many regards
Lee


Dave Peterson

Map Network Drive
 
Just curious why you can't access files on that network share by using the UNC
path (not the mapped drive).

leerem wrote:

Hi All,
I need to Map Network to 12 different sites PC's ,around the
country. At present I'm doing this manually and after my routine has run I
manually Disconnect from each site otherwise it slows down the PC, especailly
when opening or closing a workbook.
Can this be done programatically. for example I have a site in say belfast
whose ID No. is \\bft-123456w\d$ D drive being the drive in question that
needs to be accessed. on some of the sites this also requires a User name and
Password. Does anyone have and idea on how the code should be written to
accomplish this.

Many regards
Lee


--

Dave Peterson


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com