slacker Posted September 1, 2005 Share Posted September 1, 2005 Now that I have my customized Windows CD using nLite, RyanVM updates, and Bashrats driverpaks I would like to take things a step further. I use the same disk on several machines and therefore set * as the computer name in winnt.sif. It would be nice if there was some way to enter the computer name as soon as it boots from CD.Any ideas???Slacker Link to comment Share on other sites More sharing options...
Rob325 Posted September 1, 2005 Share Posted September 1, 2005 the only method I can think of (and the only one I've seen working) is to create a ram drive, copy the winnt.sif to the ram drive, write a batch script which prompts the user for the machine name and writes it back to the winnt.sifI'll be looking at doing this myself once the rest of the CD has been created (don't hold your breath!) Link to comment Share on other sites More sharing options...
cheezus420 Posted September 1, 2005 Share Posted September 1, 2005 I use a program called "WISCON.exe". I run this file at the very last stage of setup, right before cleanup.cmd is run and the comp reboots. WISCON is just a program that allows you to set the comp name, user name, set up user account, etc. Very simple program, but effective. Check it out!!! Get it here B) Link to comment Share on other sites More sharing options...
IcemanND Posted September 1, 2005 Share Posted September 1, 2005 Here is the script that i use:usage: chown.vbs [computer name (optional)]if a name is passed it sets it and continues on, reboot still required.if a aname is not passed it displays the current name in a text box and asks to set a new one, it will not go away until OK is pressed or someone kills the vbscript process from the task manager.There is more here than is really needed but whats less than 1k when you're dealing with 700mb or 4.7gb.'ChgOwn.vbs - Change Winxp Registered Owner/Organization.Option Explicitset 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)p2 = "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\"j = ws.RegRead(p2 & "ComputerName")h = ws.RegRead(p3 & "NV Hostname")f = ws.RegRead(p4 & "ComputerName")k = ws.RegRead(p5 & "NV Hostname")t = "Compuer Name Change Utility"if num=0 then do cj = InputBox("Type new Computer name and click OK", t, j) loop while cj=""end ifIf cj <> "" Thenws.RegWrite p2 & "ComputerName", cjws.RegWrite p3 & "NV Hostname", cjws.RegWrite p4 & "ComputerName", cjws.RegWrite p5 & "NV Hostname", cjEnd If Link to comment Share on other sites More sharing options...
Takeshi Posted September 2, 2005 Share Posted September 2, 2005 When to execute the vbs? And where to put it? Link to comment Share on other sites More sharing options...
IcemanND Posted September 2, 2005 Share Posted September 2, 2005 put it whereever you want. I run it from runonceex, haven't tried it from anywhere else. Link to comment Share on other sites More sharing options...
slacker Posted September 24, 2005 Author Share Posted September 24, 2005 Rob325's idea sounds like what I would like to do. The other options, don't offer much advantage to me over what I already have.My logic is...1: Put the CD in and boot from it2: Wait a minute or so, then put in the Computer Name3: Go surfing (in the ocean) and forget all about what I was working on4: Come home to a 100% configured PCRob- Since you have seen it working, could you give me some more ideas on what to do next?Lets assume that I can somehow boot from CD and run a batch file that asks the computer name.Next thing to do is copy winnt.sif to the ramdrive and modify it by changing the computer name.What do I do now?Assuming my hard drive is not formatted, how do initiate Windows setup and point it to the modified winnt.sif file?Any ideas would be greatly appreciated,Slacker Link to comment Share on other sites More sharing options...
Rob325 Posted September 24, 2005 Share Posted September 24, 2005 in the process of doing it myself. Basically my autoexec.bat calls env_config.bat which has 2 main purposes:1) ask what size hdd so it can configure the corporate specified partition sizes then pass this to gdisk (symantec's CLI fdisk equivalent)2) asks for the computername to pass back to setupItem 1 is fairly straightforward and wasn't asked for so I'll not go into that here.Item 2 runs pretty much like this:Sets up RAMDrive as eg: drive R:Copy winnt.sif to r: driveDisplay explanatory text asking for asset number in required format ie "Please enter the 6-character tag ie. PC12345"Take inputted characters and enter into r:\winnt.sifExit back to autoexec.bat to launch setup using r:\winnt.sif as the answer fileThis is obviously a high level overview which you have probably already figured out (apologies if this is the case).Once I've got a working script I'll post it up.This feature has so many possibilities eg:adding computer to domain after specifying namehaving various 'template' winnt.sif files and copy whichever one fits to the r: drive before adding the computer nameI've yet to attempt to use template runonceex files in a simliar manner as i'm not sure if it would be possible to modify them then call them.Thinking about it, you could do that by:using the pre-setup script AFTER creating the various partitions specify which runonceex file you want and copy it to the c: drive and have cmdlines.txt look at the c: drive rather than copy it over during oempreinstall. This would allow for some hardware variances in your runonceex (ie applying mobile office software for laptops but not for desktops) or you could do this by setting flag files and using runonceex to call a cmd which does an 'if exist' query..hmmmmm......sorry for going off on a unrelated ramble by the way - it happens all the time when i start thinking of things......... Link to comment Share on other sites More sharing options...
Rob325 Posted September 24, 2005 Share Posted September 24, 2005 sorry - looking at your post again you can launch setup with various switches and define a path to the sifunfortunately I can't get a budget code assigned to this work yet where i work so I'm doing it (slowly) in my spare time which is taking forver. If you can hang on I'll post up a working script. I'll also dig for any usefull syntaxes you'll need. Link to comment Share on other sites More sharing options...
slacker Posted September 24, 2005 Author Share Posted September 24, 2005 Rob,Thanks for the update. Scripts or syntaxes needed would be much appreciated as my knowledge is limited it this area. This may be the future of unattended Windows CD's. What good is an unattended setup CD that requires you to enter settings one hour after you start it? Maybe I'm just lazy, but I think we are on to something here.Thanks,Slacker 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