Bunzzing Posted April 12, 2004 Share Posted April 12, 2004 Sorry, I wasn't very clear in my previous post, it was very late... When I tested it, I made a compname.cmd with the exact code you provided, only I changed the mac adress with the mac adress of my nic and I changed the computer name. This is the compname.cmd I tested....ECHO.ECHO Setting Computer NameECHO Please wait...for /f "tokens=1" %%i IN ('compname /d ?m') do set MAC=%%iIF %MAC% == 000C29401163 compname /c TestUnattendI booted a clean windows xp pro machine and then I manually started the compname.cmd. Then I got the following error:C:\Install> for /F "tokens=1" %i IN ('compname /d ?m') do set MAC=%icompname was unexpected at this time.> was unexpected at this time> was unexpected at this timeHope you understand my problem a bit more now..... I haven't got the slightest idea why it worked the first time and now it won't..... Link to comment Share on other sites More sharing options...
enuffsaid Posted April 12, 2004 Author Share Posted April 12, 2004 removed Link to comment Share on other sites More sharing options...
Bunzzing Posted April 12, 2004 Share Posted April 12, 2004 cheers mate for the quick reply, I will try it out and post my results. Ok I tested it out, and ik worked. Thanx for your help. Will adjust the my unattended cd..... Link to comment Share on other sites More sharing options...
enuffsaid Posted April 12, 2004 Author Share Posted April 12, 2004 removed Link to comment Share on other sites More sharing options...
Bunzzing Posted April 12, 2004 Share Posted April 12, 2004 Ok, the second problem is to automate joining a domain. In the winnt.sif I already chose to join the domain, but the computername isn't correct. So after using compname.exe the computer has to join the domain. First you need a reboot because the computername has changed, then you have to log on again autmatically and then Fase 2 of the automated process has to start. I haven't figured out how to accomplish that, but I'm sure I'll find it here on the forum. The tool you need for joining a domain is NETDOM.exe. It can be found in the XP resource kit.The full line in the script should be:netdom add /domain:domainname /userd:User /passwordd:PasswordJust in case someone was wondering how to do this (just sharing my findings) Link to comment Share on other sites More sharing options...
enuffsaid Posted April 12, 2004 Author Share Posted April 12, 2004 removed Link to comment Share on other sites More sharing options...
Bunzzing Posted April 13, 2004 Share Posted April 13, 2004 Hi Bunzzing,Try this:Move your compname.cmd to the T-13 stage; run it at the end of your apps.cmd / cmdlines.txt. Then add your computer to the domain at the end of the GUIRunOnce.cmd.Can't try it for myself as I don't have a Domain Controller here. Let us know your findings.Regards,eNuffSaidWill give it a try, but won't be till tonight, off to work in a few minutes.....I'm not quite sure if I understand your explanation because my apps are installed from the GuiRunOnce.cmd. So maybe it's better for me to add the compname.cmd to the cmdlines.txt so that the compname will be changed before the runguionce.cmd. If I'm correct there is a reboot between the execution of the cmdlines.txt and the runguionce.cmd.......I'll post my findings......Off to work now Link to comment Share on other sites More sharing options...
enuffsaid Posted April 13, 2004 Author Share Posted April 13, 2004 removed Link to comment Share on other sites More sharing options...
Bunzzing Posted April 13, 2004 Share Posted April 13, 2004 "werk ze"... Bedankt, was weer een zware dag "At the office" en dat meteen na pasen..... Ok, enuffsaid, I followed your instructions. This is what I did....I put cmdlines.txt, compname.exe, regtweaks.reg en SetCompname.cmd in the C:\XPCD\$OEM$ folderCmdlines is as follows:[COMMANDS]"REGEDIT /S regtweaks.reg""SetCompname.cmd"and SetCompname.cmd is like this:ECHO.ECHO Setting Computer NameECHO Please wait...for /f "tokens=1" %%i IN ('compname /d ?m') do set MAC=%%iIF %MAC% == 000C29401163 compname /c TestUnattendSo during the T-13 fase, setup will look if there's a cmdlines.txt and will execute the commands. First it will import the registry tweaks and then it wil execute the SetCompname.cmd so that it will change te computername, right... ? Now I only have to create the .iso file and boot my virtual machine with the iso. Hope it works tomorrow, time to go to bed. Link to comment Share on other sites More sharing options...
Bunzzing Posted April 14, 2004 Share Posted April 14, 2004 Ok, I tested my unattended install. Installing the applications went perfectly well, changing the computername at stage T-13 also worked perfect and finally creating and joining the domain went perfect. I added the lines below to the Fase1.cmd file to create an computeraccount in the domain and to join the domain. After the reboot, I had the option to log on as a local user on my workstation, or the option to log on to the domain. Verified Active Directory Users and Computers on my DC to see wether the computeraccount had been created or not.... and it had been...ECHO.ECHO Joining the DomainECHO Please wait....start /wait %systemdrive%\install\netdom add %computername% /domain:yourdomainname.com /userd:adm_join /passwordd:joindomainstart /wait %systemdrive%\install\netdom join %computername% /domain:yourdomainname.com /userd:admjoin /passwordd:joindomainEnuffsaid, thank you for all your input, you really helped me a lot....Bedankt man..... Link to comment Share on other sites More sharing options...
enuffsaid Posted April 14, 2004 Author Share Posted April 14, 2004 removed Link to comment Share on other sites More sharing options...
Swerver Posted April 15, 2004 Share Posted April 15, 2004 Nice work I have put this to use thanks!Any ideas on assigning different CD keys via MAC address aswell as the com names? Link to comment Share on other sites More sharing options...
enuffsaid Posted April 15, 2004 Author Share Posted April 15, 2004 removed Link to comment Share on other sites More sharing options...
Swerver Posted April 21, 2004 Share Posted April 21, 2004 Any ideas on assigning different CD keys via MAC address...Hmm... not that its any of my business, but why would you want to do that?Kind regards,eNuffSaid Because my company does not use corporate keys, they use action pack keys5 keys all up and can be activated 5 times each.Therefore when computer "a" with mac address "assigned" needs a reinstall, the unattended CD always gives the same CD key to that specific computer.Thats ok? Link to comment Share on other sites More sharing options...
enuffsaid Posted April 21, 2004 Author Share Posted April 21, 2004 removed Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now