cowsmanaut Posted June 10, 2004 Share Posted June 10, 2004 (edited) Hi there, I've been souring the net.. I'm sure there is a way to do this but I have not yet found it. I want to change the computer name and workgroup of the computers with the script I've written to identify them. However I would really preffer not to have to use auto it to open up the properties window.. go down to the button change the name go back.. etc etc etc. Does anyone know if there is a direct command either in CMD or in Autoit (I know I can find the name by @computername but doesn't seem to affect change) in order to change these without the long and dirty process? Thanks oh.. and they are all windows XP pro Edited June 10, 2004 by cowsmanaut Link to comment Share on other sites More sharing options...
bobheart Posted June 10, 2004 Share Posted June 10, 2004 http://support.microsoft.com/default.aspx?...&NoWebContent=1not sure if thats what you want ? Link to comment Share on other sites More sharing options...
cowsmanaut Posted June 10, 2004 Author Share Posted June 10, 2004 Bob... You rock! Damn.. I must have been looking in the wrong places. Anyway, tested it out after I hunted down the regfind tool.. worked like a charm. Thanks Now all I need is the workgroup... hmmm.. Link to comment Share on other sites More sharing options...
trids Posted June 11, 2004 Share Posted June 11, 2004 Hi there, I've been souring the net..ROFL .. was that on purpose, cow? (sorry to be so cheesy, i'm not normally this whey ) Link to comment Share on other sites More sharing options...
Guest Guest Posted June 11, 2004 Share Posted June 11, 2004 yeah.. I think my udders were a bit ripe.. rotten milk went everywhere Oh incedently.. while sCouring the net the second time.. I found that annother tool that comes in the same set as the regfind tool (incedently neither come with windows directly but are part of a extra package) that does the same job only the line is much shorter and has nothing to do with the registry (safer) still nothing on the workgroup yet though.. hmmm Link to comment Share on other sites More sharing options...
cowsmanaut Posted June 11, 2004 Author Share Posted June 11, 2004 bah.. somehow I keep being logged out.. how odd. Anyway.. that was me. ^ Link to comment Share on other sites More sharing options...
Holger Posted June 11, 2004 Share Posted June 11, 2004 (edited) Maybe this one will help you?!:http://support.microsoft.com/default.aspx?...;298593&sd=techor this:http://www.sysinternals.com/ntw2k/source/newsid.shtml Edited June 11, 2004 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
sugi Posted June 11, 2004 Share Posted June 11, 2004 (edited) On NT4 I'm simply writing the new name to HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName from within my cloning scripts and reboot the computer... works for about 500 computers here, no need for external utilities, etc.EDIT: Just checked... it does NOT work on WinXP. At least it doesn't change all of the needed entries. So don't use this on WinXP! Edited June 16, 2004 by sugi Link to comment Share on other sites More sharing options...
Holger Posted June 11, 2004 Share Posted June 11, 2004 @sugi: and how did you change the SID's on this computers? Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
sugi Posted June 11, 2004 Share Posted June 11, 2004 I just dont change the SID. Link to comment Share on other sites More sharing options...
cowsmanaut Posted June 11, 2004 Author Share Posted June 11, 2004 (edited) Yes NetDom.exe is the one I'm using now instead of regfind.exe to change the computer name. However, doesn't look like it does anything with the workgroup. Perhaps I just missed that part. Holger, using http://unattended.sourceforge.net to do your windows install and autoit to install your software you will not need to image ever again. Thus no need to change the SID at all. Part of the main reason we went to this option in the first place.I think there may be a way to enter the workgroup from "unattended" as it installs windows. so maybe I'll hunt that down. Oh Sugi.. that looks like it's similar to the registry entry.. do you have that portion of the code you could post? Are you using regedit or something? mooedit: yep.. unattended has it in advanced options [Identification] JoinWorkgroup=FOOBARsimple as that. I'll still use my code to set individual names though. Unatended has something for that based on IP like my script but is untested and I'm not 100% sure how it's operating.. Edited June 11, 2004 by cowsmanaut Link to comment Share on other sites More sharing options...
sugi Posted June 14, 2004 Share Posted June 14, 2004 As this part of the cloning process is done using a batch file I don't have AutoIt code for this... but it's not hard to do. The following is for batch files: reg update HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName=%NEWCOMPNAMEUPPER% The code uses the reg.exe utility from NT4 ressource kit but it's also possible to create a regini file to write to this key which has the advantage that regini is available on every Winodws NT based system. This code should do the same in AutoIt3 but I haven't tested it: RegWrite('HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName', 'ComputerName', 'REG_SZ', StringUpper($NewComputerName)) Just a small note: On Windows NT 4 the computername is usually in CAPS, so you should convert the computername to caps before writing it to this key. Don't know about Active Directory though. Link to comment Share on other sites More sharing options...
cowsmanaut Posted June 14, 2004 Author Share Posted June 14, 2004 oh just to point out to others who have not yet tried this Unattended.sourceforge.net option and are still using imaging. I would completely and absolutely recomend dropping all forms of imaging in favour of this. (I had previously assumed most autoit users were doing this already) At the college we have run into soooooo many problems using imaging. One in particular is not all images are created equal it would seem. Tiny little quirks in settings or small bugs introduced in the resut of a bad copy of just a few bytes. Unattended will set up your windows install fast without prompting you or even showing you a single screen. Then running auto it as a part of it means I get all my programs installed. It just goes like mad. I pop in a disk.. boot it up and off it goes.. partitions, installs windows and then continues installing and doing whatever I need. all over the network.. it's not quite as fast as an image but close. And the biggest advantage is that I can use the same scripts on *ANY* machine. Even if they don't have the same hardware.. and because it's a legitimate install rather than an image.. no need to change the sid. so.. from someone who previously loved imaging.. I'd recommend the switch. moo Link to comment Share on other sites More sharing options...
sugi Posted June 15, 2004 Share Posted June 15, 2004 Unattended will set up your windows install fastIt's fast when compared to installing the system by hand. But even unattended installation took 6 to 8 hours (depending on the application set) here... and that's just too long. Cloning takes around 30-60 minutes and when the clones are well maintained there are no problems. 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