473,320 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Anyone had success using NetUseAdd() on shares accessed through aWindows 2003 DFS root?

Has anyone had success using NetUseAdd() on shares that were replica links on a Windows 2003 DFS root? In my code, I'm getting error:

pywintypes.error: (67, 'NetUseAdd', 'The network name cannot be found.')

This is my scenario:
Win2003 Server hosting DFS root #NTS-03
\\NTS-03.central.purdue.lcl\MI
Win2003 Server hosting file share
\\itifs03.itap.purdue.edu\itea_zonedirs\MI

<code>

import win32net

# this works --
win32net.NetUseAdd(None,1,{'remote':r'//itifs03.itap.purdue.edu/itea_zonedirs/MI/TEAMDIRS/DCS
Zone','local':'W:'})

# this doesn't work --
win32net.NetUseAdd(None,1,{'remote':r'//NTS-03.central.purdue.lcl/MI/TEAMDIRS/DCS
Zone','local':'W:'})

</code>

Any help greatly appreciated.

-Sean.

Nov 8 '07 #1
2 3460
On Nov 8, 2:23 pm, Sean Peterson <sean...@gmail.comwrote:
Has anyone had success using NetUseAdd() on shares that were replica links on a Windows 2003 DFS root? In my code, I'm getting error:

pywintypes.error: (67, 'NetUseAdd', 'The network name cannot be found.')

This is my scenario:

Win2003 Server hosting DFS root #NTS-03
\\NTS-03.central.purdue.lcl\MI

Win2003 Server hosting file share
\\itifs03.itap.purdue.edu\itea_zonedirs\MI

<code>

import win32net

# this works --
win32net.NetUseAdd(None,1,{'remote':r'//itifs03.itap.purdue.edu/itea_zonedirs/MI/TEAMDIRS/DCS
Zone','local':'W:'})

# this doesn't work --
win32net.NetUseAdd(None,1,{'remote':r'//NTS-03.central.purdue.lcl/MI/TEAMDIRS/DCS
Zone','local':'W:'})

</code>

Any help greatly appreciated.

-Sean.
We actually use win32wnet.WNetAddConnection2 to map a drive. The
following recipe lists a slightly different way of doing it as well:

http://aspn.activestate.com/ASPN/Coo.../Recipe/426742

I don't think you need to make those path strings into raw text if
you're using forward slashes, by the way.

Mike

Nov 8 '07 #2
On Nov 8, 2:23 pm, Sean Peterson <sean...@gmail.comwrote:
Has anyone had success using NetUseAdd() on shares that were replica links on a Windows 2003 DFS root? In my code, I'm getting error:

pywintypes.error: (67, 'NetUseAdd', 'The network name cannot be found.')

This is my scenario:

Win2003 Server hosting DFS root #NTS-03
\\NTS-03.central.purdue.lcl\MI

Win2003 Server hosting file share
\\itifs03.itap.purdue.edu\itea_zonedirs\MI

<code>

import win32net

# this works --
win32net.NetUseAdd(None,1,{'remote':r'//itifs03.itap.purdue.edu/itea_zonedirs/MI/TEAMDIRS/DCS
Zone','local':'W:'})

# this doesn't work --
win32net.NetUseAdd(None,1,{'remote':r'//NTS-03.central.purdue.lcl/MI/TEAMDIRS/DCS
Zone','local':'W:'})

</code>

Any help greatly appreciated.

-Sean.
I'm not seeing any typos in your code...but it looks like you're
trying to map two different locations to the same drive letter. Maybe
that's throwing an error in and of itself?

Nov 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Harlin | last post by:
Has anyone had any success using py2exe with anything you've written using the Python .NET implementation? (This is the one from the Zope website -- not ActiveState). I seem to be having trouble...
0
by: Eduardo Pérez Ureta | last post by:
I'm looking for an easy way to use mysql from user (no root, no mysql system account) space. I don't want the user of my application to have to use a password to connect to the database. I want to...
3
by: Bob Alston | last post by:
Anyone yet using this software? A free beta version is available here: http://msdn.microsoft.com/asp.net/getvwd/ The guided tour: http://beta.asp.net/guidedtour2/
0
by: Jonathan Wilson | last post by:
Firstly, to get msvcrt.lib, install the .NET framework SDK. The version of msvcrt.lib included there is the exact same one as comes with Visual Studio ..NET 2003. There are some other things that...
8
by: Earl Damron | last post by:
Has anyone tried having both the original .NET and .NET 2003 on their workstation at the same time? I now need to build and support apps for two different clients that use different versions so...
2
by: dick3425 | last post by:
I used register the crystl32.ocx then put the active X control (Crystal Report Control) on the form name it Report1 and write the following code assigned to a button: Private Sub cmdPrint_Click()...
0
by: sukumaster | last post by:
hello everybody i hv created a tool bar by using macros in ms word 2003. i add some code for it in VB.i want to export that tool bar . because i have to send that tool bar to other sysems having...
10
by: socondc22 | last post by:
my program is trying to use the babylonian algorithm in order to find the square root... i have a number for the number to have the square root taken of and also a number to run the loop... Whenever...
3
by: David K in San Jose | last post by:
I'm using managed (CLR) C++ in VS2005 to create a Windows app that contains a form named "MyForm". In the code for that form I'm trying to invoke some static functions by using an array of function...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.