hadoka Posted October 21, 2006 Posted October 21, 2006 (edited) Hi everybodyI have a question, I have many computers in my networks and i use deffirent computer names and workgroups for each.My question is how to make an Unattended install including all my computer names and workgroups , which allow me to chose for every computer i would like to install a new windows to chose its name and work group .Or i have to make a cd for each one???and also how do relate there ip address to each one? Edited October 21, 2006 by hadoka
IcemanND Posted October 21, 2006 Posted October 21, 2006 I set my install to give the machine a randomly generated name and then run a script at first login (I also set the machine to autologin twice) to get the ip address and and nslookup on the address to get the registered computer name and then change the computer name. We don't care what the workgroup name is so I set all of them to the same thing. If the workgroup it is supposed to be in is returned by nslookup you could parse it out and assign it there otherwise you will have to have a way to associate a machine name to a workgroup.Hope this helps.
Telenut Posted October 22, 2006 Posted October 22, 2006 I'm verry interested in the scriptWould it be possible to change the registration key on the same way? (yes indeed, they don't want to pay for a corporate licence... we have to activate every single computer after a restore)
IcemanND Posted October 22, 2006 Posted October 22, 2006 (edited) I'll post the script tomorrow when I get to work.As far as changing the product key you would need to have a file somewhere that related the machine to a particular product key. something as easy as a text file with tab or comma separated values would work. then after configuring the name you could search the file for the computer name and license number and change it using the scripts microsoft provides.Do you want the vbscript or the cmd script? or both? Edited October 22, 2006 by IcemanND
cluberti Posted October 23, 2006 Posted October 23, 2006 If you've got a Windows Server that you have access to, this can be done via RIS. It can also be configured via unattended install scripts started via WinPE before installation, or via scripts called from the GuiRunOnce section after installation. Have you visited the unattended site here on MSFN?
Telenut Posted October 23, 2006 Posted October 23, 2006 Both would be welcome.It has been a while since a visited the unattended part, and I can not remember that it contained something similar. Have to take a look at it again I guess...Will be for the weekend. Too much work now :s
IcemanND Posted October 26, 2006 Posted October 26, 2006 Sorry it took so long been out sick.here is the cmd script to get the name from the network: Change the 188 to the first octect of you IP addreses, or if you want to further narrow it change that same line to include more of the for variables.%c %d %e %f would be the entire ip address with spaces between the octets.for /f "tokens=1-6* Delims=.: " %%a in ('ipconfig /all') do ( if "%%a %%b %%c"=="IP Address 188" ( for /f "tokens=1,2* delims=:. " %%x in ('nslookup %%c.%%d.%%e.%%f') do ( if "%%x"=="Name" wscript chgown.vbs %%y ) ))And here is the VBScript (named: chgown.vbs)I used to change the name pilfered from somewhere and modified to take an argument to change the name to or prompt for one if not given.'ChgOwnOrg.vbs - Change Win9x Registered Owner/Organization.'Modified for Windows XPSet colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration",,48) For Each objItem in colItems strIPAddress=objItem.IPAddress(0) arrIPAddress=split(strIPAddress,".") objitem.DNSName if arrIPAddress(0)="129" and arrIPAddress(1)="74" then cj=objitem.DNSHostName end ifnextset args = WScript.ArgumentsSet ws = WScript.CreateObject("WScript.Shell")Dim args, ws, t, p2, p3, p4, p5, n, j, h, f, k, cjDim itemtype,numnum=args.countif num>0 then cj=args.Item(0)end ifp2 = "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName\"p3 = "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\"p4 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\"p5 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\"if num=0 and cj="" then t = "Computer Name Change Utility" do cj = InputBox("Type new Computer name and click OK", t, j) loop while cj=""end ifIf cj <> "" Then ws.RegWrite p2 & "ComputerName", cj ws.RegWrite p3 & "NV Hostname", cj ws.RegWrite p4 & "ComputerName", cj ws.RegWrite p5 & "NV Hostname", cjEnd If
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