Thank you for your replies.Actually,the real example is that command1 renames the computer and command2 makes the machine join a domain. For some reason, it seems that the machine can not rename itself and join a domain at same time. What I am thinking is that 1.Command1 renames the machine and reboots the machine 2.Once the machine starts up again, command2 make the machine join a domain. The name of machine and domain can not be determined in answer file. That means, user should supply the name of machine and domain during installation. Is it possible?