PC Review Forums Newsgroups Windows XP Windows XP Setup Having Problems joining computer to the domain

Reply

Having Problems joining computer to the domain

 
Thread Tools Rate Thread
Old 22-01-2007, 08:52 PM   #1
chetanh@gmail.com
Guest
 
Posts: n/a
Default Having Problems joining computer to the domain


Hi
I have written 2 exe files using SMS installer.
The first exe file will set the computer to rename after reboot and
copy the second exe file to c:\windows\Temp
The second exe file will run after reboot and add the computer to the
domain using netdom tool. Here is what the script of the second exe
file looks like:

item: Set Variable
item: Install File
Source=C:\Packages\Addtodomain\renamecomp.bat
Destination=%TEMP%\renamecomp.bat
item: Install File
Source=C:\Packages\AddCompToDomain\netdom.exe
Destination=%TEMP%\netdom.exe
item: Get Registry Key Value
Variable=HNAME
Key=System\CurrentControlSet\Control\ComputerName\ComputerName
Value Name=ComputerName
item: Execute Program
Pathname=%temp%\renamecomp.bat
Command Line=%HNAME%

so basically this will pass the computer name to renamecomp.bat which
has the entire netdom command to add a computer to the domain.

I first tested this script by running these tools individually and it
worked, the computer got added to the domain.
But when the second script runs after reboot the computer stays in the
workgroup and does not get added to the domain.
I go into the c:\windows\temp folder and i can see that i extracted
netdom.exe and renamecomp.bat to c:\windows\temp and i get the message
windows so i know that the program ran. It just dosent want to add it
to the domain when it is run at startup. When doubleclicked it adds to
the domain.
I am not sure why this is happening. Please help!!

Is there any other way i can automatically rename a computer and add it
to the domain. I tried the script at microsoft script center but it is
only good to rename a computer it does not add it to the domain.
Please help
My workstation is XP and Domain is 2003

thanks

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off