Can someone help me figure out why this code is failing. I would appreciate info on how to debug the Win32 libraries to solve problems like this as well. The code I am using follows: The error occurs on the NetUserAdd call. I am running Windows 2000 Pro. import sys import win32net from win32netcon import * # # Setup WSH Objects. # WSHShell = WScript.CreateObject("WScript.Shell") WSHNetwork = WScript.CreateObject("WScript.Network") # # Testing setup for local user # Server = "" UserInfo = win32net.NetUserGetInfo(Server,WSHNetwork.UserName,10) print UserInfo USER_INFO_1 = {} USER_INFO_1['name'] = "DeleteMe" USER_INFO_1['password'] = None USER_INFO_1['password_age'] = 0 USER_INFO_1['priv'] = USER_PRIV_ADMIN USER_INFO_1['home_dir'] = None USER_INFO_1['comment'] = 'Local admin account for the developer' USER_INFO_1['flags'] = UF_DONT_EXPIRE_PASSWD | UF_NORMAL_ACCOUNT USER_INFO_1['script_path'] = None try: win32net.NetUserAdd(None,1,USER_INFO_1) except win32net.error: print 'Call to NetUserAdd failed with:' print sys.exc_type , sys.exc_value Shop online without a credit card http://www.rocketcash.com RocketCash, a NetZero subsidiary _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/activepython