Jeroeneke Posted February 16, 2006 Share Posted February 16, 2006 (edited) Hi,I am crea ting creating an unattended Windows 2003 + XP installation for a mid-range company (about a 300 pc's in the network).Now you all know if all those PC's should get the same computername it won't work. That's why I'm searching for something to change the computername in the registry. I would create a little VS.NET tool to give in the computername when installation is finished. Then create .REG-keys with that computername in it. Than automatically add the reg keys to the registry if the user clicks on OK or something.But my question is, is it possible to change the computername WITHOUT you have to reboot ? I've searched for the reg keys which have the computername.HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName: "GE-324PT0J-TEST"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName: "GE-324PT0J"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AltDefaultDomainName: "GE-324PT0J-TEST"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AltDefaultDomainName: "GE-324PT0J"HKLM\SYSTEM\ControlSet001\Control\ComputerName\ComputerName\ComputerName: "GE-324PT0J-TEST"HKLM\SYSTEM\ControlSet001\Control\ComputerName\ComputerName\ComputerName: "GE-324PT0J"HKLM\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName\ComputerName: "GE-324PT0J-TEST"HKLM\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName\ComputerName: "GE-324PT0J"HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\NV Hostname: "ge-324PT0J-TEST"HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\NV Hostname: "GE-324PT0J"HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Hostname: "ge-324PT0J-TEST"HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Hostname: "GE-324PT0J"HKLM\SYSTEM\ControlSet002\Control\ComputerName\ComputerName\ComputerName: "GE-324PT0J-TEST"HKLM\SYSTEM\ControlSet002\Control\ComputerName\ComputerName\ComputerName: "GE-324PT0J"HKLM\SYSTEM\ControlSet002\Services\Tcpip\Parameters\NV Hostname: "ge-324PT0J-TEST"HKLM\SYSTEM\ControlSet002\Services\Tcpip\Parameters\NV Hostname: "GE-324PT0J"HKLM\SYSTEM\ControlSet002\Services\Tcpip\Parameters\Hostname: "ge-324PT0J-TEST"HKLM\SYSTEM\ControlSet002\Services\Tcpip\Parameters\Hostname: "GE-324PT0J"HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName: "GE-324PT0J-TEST"HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName: "GE-324PT0J"HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName\ComputerName: "GE-324PT0J-TEST"HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName\ComputerName: "GE-324PT0J"HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV Hostname: "ge-324PT0J-TEST"HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV Hostname: "GE-324PT0J"HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Hostname: "ge-324PT0J-TEST"HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Hostname: "GE-324PT0J"HHKU\S-1-5-21-2025429265-1957994488-1343024091-500\Volatile Environment\LOGONSERVER: "\\GE-324PT0J-TEST"HKU\S-1-5-21-2025429265-1957994488-1343024091-500\Volatile Environment\LOGONSERVER: "\\GE-324PT0J"The first keys are the ones it was original, the second key is the edited key. (so first it was "ge-324PT0J-TEST" and then it was "GE-324PT0J")If I create a reg file with all those values in it (the new ones). And I add it to the registry, will the computername then be changed good and won't the computer reboot afterwards ?ALSO I have a little question:is it possible to do something with the IP-adress to ? So creating another tool (or in the same tool) and than give up the IP adress so that is fixed too ?I can't test atm for all that stuff so hopefully somebody knows!thanks in advance.Jeroen.EDIT:After some searching I found this:http://mystuff.clarke.co.nz/wsname.aspthis propably will be easyer than creating a tool by myself, will test it later today if I have some time and a pc to test Edited February 16, 2006 by Jeroeneke Link to comment Share on other sites More sharing options...
Rambler Posted February 16, 2006 Share Posted February 16, 2006 Um, why don't you just use unattend.udb file with all the names of those computers - you apparently know them ahead, so that would be easy to implement. Link to comment Share on other sites More sharing options...
Jeroeneke Posted February 16, 2006 Author Share Posted February 16, 2006 What's it with that unattend.udb file ?Yes, I know all the Computernames and ip-adresses ahead!It's actually used in my school, and the ip-adresses ar sorted by class like this:10.0.<class>.<pcnumber>(for example: 10.0.206.11 (this means pc 11 in room 206)The computernames are quite comon i thought (I should watch at school for it)so can you please explain me bit more? thx!jeroen. Link to comment Share on other sites More sharing options...
muiz Posted February 16, 2006 Share Posted February 16, 2006 (edited) Use this in winnt.sif under user data :[userData] ComputerName = "*"This way it generates a random name Edited February 16, 2006 by muiz Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 16, 2006 Share Posted February 16, 2006 Try this it for changing the info with out rebooting, this is a HTA with vbs script in it.ChangeUserInfoTry this it does the same but it is a Vbnet project I am playing around with, you need Net Framework 2 for it to work. My App Link to comment Share on other sites More sharing options...
Jeroeneke Posted February 16, 2006 Author Share Posted February 16, 2006 Thx!Can you please send me the project files of that VB.NET project (sourcecode etc.)I would like to have a look on it as it looks interesting!thx!jeroen.Will test both later on if I find some time Link to comment Share on other sites More sharing options...
Rambler Posted February 16, 2006 Share Posted February 16, 2006 What's it with that unattend.udb file ?Sorry, I didn't realize you are installing from CD - that way you can't use the unattand.udb file - it can only be used when you initiate the installation manually (for example booting to dos/bartpe/winpe and using winnt.exe).But if you were installing from network distribution or started the installation manually via one of the methods, then you could use it. Simply put you add /udf parameter to winnt.exe command so it looks like:winnt /unattend:z:\unattend.txt /udf:PC01,unattend.udbwhen installing PC with the name PC01. z:\unattend.txt is the path to the answer file (just other name for winnt.sif) and unattend.udb is the Uniqness Database File - the values from it overwrite the values in the answer file. So let's illustrate on my little example - I have this unattend.udb file:;SetupMgrTag[UniqueIds] PC-01=UserData PC-02=UserData PC-03=UserData[PC-01:UserData] ComputerName = PC-01[PC-02:UserData] ComputerName = PC-02[PC-03:UserData] ComputerName = PC-03Now when I want to install PC with the name PC-03, I use this command:winnt /unattend:z:\unattend.txt /udf:PC-03,unattend.udbThis way you can have as many predefined names as you want. You can ofcourse override other settings of the answer file in the .udb file, but just be warned that inserting Windows product key never worked for me this way (although it is supposed to).Sorry for bit offtopic comment.PS: I think you have to use winnt32.exe instead of winnt.exe when installing from WinPE (and I assume the same goes for BartPE). Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 16, 2006 Share Posted February 16, 2006 Here is is a link to my My Webpage it has a few things there that may intrest you. The project files is the second link in the left side of the page. Link to comment Share on other sites More sharing options...
VCC Posted February 17, 2006 Share Posted February 17, 2006 (edited) Another solution: Try this Novell utility for changing the workstation name of a Windows computer.Zcnc Lite 1.3It works very well. Does not require a reboot and can be run whenever you like. I have it run after everything else is finished with my UA install. Edited February 17, 2006 by VCC Link to comment Share on other sites More sharing options...
Jeroeneke Posted February 17, 2006 Author Share Posted February 17, 2006 (edited) Thank you so much gunsmokingman for those project files!At school I have to program in VS.NET 2003 (for 2years now) but we don't see any useful things (in my eys)!but your program is a good study object for me! Good to learn some things!thanks man!Will watch your codes! (Just downloaded VB.NET from the microsoft site, it seems to be free now )EDIT: I just have a question, are you good in programming in VB.NET ? I'm searching for something for some months now, but I couldn't find, but I'm quite sure it should work! So maybe you could help me ? lol, this is getting quite offtopic now EDIT2: oh man this is so great, I've found what I've searched for, just be studying your code for some minutes! Thx man! Edited February 17, 2006 by Jeroeneke 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