473,395 Members | 1,915 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,395 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 3469
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.