Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Domain join script fails on windows XP

Status
Not open for further replies.

jereader

Technical User
Feb 28, 2012
3
US
Hello All,

This is my first post here, so please forgive me if I am out of place.

The script I am working on is intended for use at first boot. The script asks the user if he/she would like to join a particular domain, offering yes/no buttons. If the user presses yes, the script should then join the workstation to the specified domain using the specified username and password. All is well until line 20. The script host returns the following error:

Line: 20
Char: 2
Error: 0x80041024
Code: 80041024
Source:(null)

Now, I have changed the strDomain, strUser, and strPassword strings to the correct values in my production script, so I am confident that is not the problem.

My research leads me to believe that error 0x80041024 is equal to WBEM_E_PROVIDER_NOT_CAPABLE. This is the error returned when the workstation is currently NOT joined to a domain. if the computer IS JOINED to a domain, the script returns the following error at the same line: 0x80041002 which MSDN shows to be WBEM_E_NOT_FOUND

To make this more confusing, the script only fails on windows xp. On a windows 7 machine the script seems to work correctly (i've only tried it on a machine that is already joined and it correctly returns status 2691.).

This information is from:
Any help to resolve this issue would be greatly appreciated. Thank you in advance.
 
Apologies, the script is at the link below the post. Thanks!
 
Found this and seem to have resolved the issue using USER@DOMAIN for strUser:

UserName [in]
Pointer to a constant null-terminated character string that specifies the account name to use when connecting to the domain controller. Must specify a domain NetBIOS name and user account, for example, Domain\user. If this parameter is NULL, the caller information is used.
You can also use the user principal name (UPPED) in the form user@domain.
Windows 2000, Windows NT 4.0, and Windows Me/98/95: You cannot specify UserName in UPPED format.


This information was taken from:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top