Viper999 Posted August 12, 2005 Share Posted August 12, 2005 I am trying to figure out a way to prefill the computer name while using sysprep.I have tiried using compname.exe , but that was not successful.[userdata]Computername = c:\sysprep\compname /d ?sCan onyone offer a suggestion as to how this could be accomplished using sysprep?Any help you provide would be greatly appreciated.Thanks,Jim Link to comment Share on other sites More sharing options...
Popasmurf Posted August 12, 2005 Share Posted August 12, 2005 I would also be interested to know if this is possible. Link to comment Share on other sites More sharing options...
Gee Posted August 12, 2005 Share Posted August 12, 2005 (edited) Have you tried entering it directly? This is my SysPrep.inf;SetupMgrTag[Unattended] InstallFilesPath=C:\sysprep\i386[UserData] FullName="" OrgName="" ComputerName=Your Computer NameWhy don't you just use winnt.sif to do it? It should not affect SysPrep Edited August 12, 2005 by Gee Link to comment Share on other sites More sharing options...
Viper999 Posted August 12, 2005 Author Share Posted August 12, 2005 I am trying to automate the computername prefill with compname.exe. I am trying to prefill this with the PCs serial number which is pulled from the motherboard and is accomplised by running the command compname.exe /d ?s . How would you incorporate the winnt.sif when im using sysprep.inf with sysprep.exe ?Thanks for any input. Link to comment Share on other sites More sharing options...
Gee Posted August 12, 2005 Share Posted August 12, 2005 If you can parse the serial number to a text file, then you can use a batch file to fill it in. ie.compname.exe /d ?s > c:\serial.txtThen use a batch file to modify the registry@ECHO OFFset Serial=temp%Serial% < c:\serial.txtclsECHO Building Registry File ...ECHO Windows Registry Editor Version 5.00 > \serial.regECHO.ECHO [HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\] >> \serial.regECHO "ComputerName" = "%Serial%" >> \serial.regregedit /s \serial.reg:ENDexitSomething to that extent. You get the idea. Link to comment Share on other sites More sharing options...
Viper999 Posted August 12, 2005 Author Share Posted August 12, 2005 I can always run a batch after the machine comes up using the same compname.exe file, but I was looking for a way to incorporate it into sysprep.inf file. Meaning as the computer is coming up the computername field would be filed in with the correct computername that being the asset tag(serial number).Thanks for any help you provide in resolving this issue. Link to comment Share on other sites More sharing options...
Gee Posted August 12, 2005 Share Posted August 12, 2005 [userdata]Computername = c:\sysprep\compname /d ?s<{POST_SNAPBACK}>I don't think you can parse information into SysPrep.infThe problem with your above command is that it is trying to execute a program from SysPrep.inf and it can not do that.You would need the data and then find a way to enter it into SysPrep.inf before SysPrep executes.copy/b Serial.txt + SysPrep.inf SysPrep.infmay do it, but unlikely as Serial.txt would have to be formatted properly.Sorry, I am out of ideas Link to comment Share on other sites More sharing options...
Scrapple Posted August 12, 2005 Share Posted August 12, 2005 I'm surprised how few people actually use sysprep's "factory-mode"Do a: sysprep -factory, shutdown and clone the partition/disk.Deploy that image to a machine and boot it (=factory mode) and allows you to run scripts that modify sections in a sysprep.inf or selects a file from a list of sysprep.inf-templates and renames it to C:\sysprep\sysprep.inf'(all these files can come from a network share, if you did integrate the network drivers!)The scripts that alter or choose the correct sysprep can be run automatically if you put them into winbom.ini or normal startup or runonce-reg entry and even manually!)After that, click sysprep reseal button (sysprep dialog starts automatically in factory mode) OR put resealmode=reseal section in winbom.ini to run it silently without user intervention)Then the deploy pc will reboot and use YOUR pre-filled/auto-selected sysprep.inf in it's mini-setup.IMO sysprep's factory mode is it's most powerful feature... it can install stuff like hotfixes, updated apps and ever changing scripts, including sysprep.inf...etc...from a network-enabled state. Besides that, it also does pnpdriver-installing silently. So it's all done BEFORE reseal but AFTER image-deployment.You can even use it to detect and put in the correct HAL update. Ever heard of a "Universal Image" :-)This way Sysprep-imaging (with a couple of scripts and cmdline tools) AND the BTS-driverpacks are an extremely versatile and fast deploy mechanism.Now, if you add Vista's great ximage, drvload and the wimfltr-driver to that... it's a deployers heaven. It's the way almost anyone will deploy Windows systems in a couple of years. Garanteed. There are people that are already using it today to deploy XP. :-) Link to comment Share on other sites More sharing options...
Viper999 Posted August 13, 2005 Author Share Posted August 13, 2005 This is a bit over my head. Any link for additional info. Would like to accomplish for both xp and Win2k. I didnt think you could use facoty mode with win2k.Thanks for any help Link to comment Share on other sites More sharing options...
Nilfred Posted August 13, 2005 Share Posted August 13, 2005 Already covered! Link to comment Share on other sites More sharing options...
Viper999 Posted August 13, 2005 Author Share Posted August 13, 2005 Im confused. I could make a batch file that does compname.exe /d ?s > userdata.inf, but when would this batch file run and what would control this batch file running. I would need sysprep.inf to be modded as computer is coming up for the first time to make sure the PC is coming up with the correct serial number.Also how would I origionally run sysprep? Would I origionally run sysprep with sysprep1.inf which would contain all data except the userdata section which would house the userdata section of sysprep.inf ?Thanks in advance for you help. I appreciate it.Jim Link to comment Share on other sites More sharing options...
permster Posted July 15, 2006 Share Posted July 15, 2006 You guys are trying to reinvent the wheel here. Do a google search for "wsname". This little utility does everything you guys are wanting and more. I set the "ComputerName=*" in the sysprep.inf and then let this utility run in the cmdlines.txt to rename the computer account to the correct name.Works great. I even set up a login script to collect MAC addresses and computer names to populate a file that can be used with "WSName". If anyone wants to see specifics I think I still have the files so I can show you. 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