Viper999 Posted June 22, 2005 Share Posted June 22, 2005 I guess Im trying to simplify this. If you had an exe that identified the cpu type then you could make a decison based on that processor type what hal to use. You could have all the different hals and kernels extracted in advance and on the hd. You run this command to detect the processor type then just copy the appropriate hal and kernel to hal.dll and ntosxxx.exe to the windows system directory. I guess in a nutshell that is what I am trying to get out of this. Link to comment Share on other sites More sharing options...
sintaxasn Posted June 22, 2005 Share Posted June 22, 2005 (edited) Identifying the CPU type isn't helpful, as then you need something that determines what CPU has what HAL type - probably an extensive INI file or something, and you'd need to maintain it. At least with the SMBIOSD.Exe, it tells you either it's APIC or not. And I haven't been able to track down the same info through WMI.With the method you outline, you've got two problems:A: You have to have a HAL to get into Windows, and you're bound to find some machines that wont boot off your predefined HAL (even the standard PC one.) - hence you wont be able to get into Windows to change it.You *MIGHT* be able to get around this by using WinPE to do your imaging. Once the image is on the machine, detect the HAL type and switch the files.B: HAL switching isn't supported by Microsoft. If you end up having a problem affecting all your machines, hell, it could even be an Office issue - they have every right to tell you to sod off, even if the problem IS their problem.Unfortunately, there's no workaround for problem B, but if you aren't concerned, well i guess on your own head be it.Cheers, Dan Edited June 22, 2005 by sintaxasn Link to comment Share on other sites More sharing options...
Viper999 Posted June 22, 2005 Share Posted June 22, 2005 Ok im going to make it even simpler. We can know in advance which hal a computer uses by simply bringing up the machine with the factory image and copying the hal and kernel off of it. I guess what I can do is create a batch file asking what type of machine are you imaging and then copying the appropriate hal and kernel. I guess after ghositng is completed I could ask the question, run ntfs4dos, copy the appropriate hal and kernel, let the machine come up and detect the hardware. Does this sound like it would work ? Link to comment Share on other sites More sharing options...
sintaxasn Posted June 22, 2005 Share Posted June 22, 2005 hehe, if you're going to make it that simple, then yes - this would *probably* do the trick. As far as I'm aware, switching the DLLs works without the need for regkey changes or any playing with devcon.you're tradeoff is automation though. and you've still got the support issue.Dan Link to comment Share on other sites More sharing options...
maxamoto Posted June 22, 2005 Share Posted June 22, 2005 Viper, yep it's VBS. I haven't debugged it but it should work. Put the exe in the same folder, or reference a folder in the CMD /C<commandhere> part.After it all, you'd probably have something likeIf sAPIC = True Then oShell.Run "DevCon <do_your_APIC_swapping_here>",1, TrueEnd IfDont have time to figure all this stuff out tho!Re Maxamoto's comments on RIS, yep - RIS *WOULD* avoid this problem, but if you're in the same situation as our company is, we have about an hour to migrate a machine from 2000 to XP:Backup user data (circa 4GB)Image a machine (5GB)Let sysprep run and machine config itselfRestore user dataWe JUST about manage by using imaging (from USB 2.0 drives). Imaging is the only way to get turnaround times like this. I know some of our other european offices use RIS, but they dont have ridiculous SLA's to meet!If you aren't under time contraints, consider RIS Dan<{POST_SNAPBACK}>Yeah, I hear ya. We eventually caved and went with roaming profiles and a few batch files to capture whatever the roaming profile feature left behind. That helped immensely with upgrades and maintaining user data.My troubleshooting is flawed to begin with, unfortunately. I'm in the Army, and we have pretty much unlimited funds to throw at our problems. I have to constantly remind myself that not every company out there is as lucky as we are when it comes to finances Link to comment Share on other sites More sharing options...
sintaxasn Posted June 22, 2005 Share Posted June 22, 2005 Yeah, I hear ya. We eventually caved and went with roaming profiles and a few batch files to capture whatever the roaming profile feature left behind. That helped immensely with upgrades and maintaining user data.Roaming profiles not an option for us - however, looking at a VERY nice product right now which would essentially wipe out the need to migrate data, and ensures we have a backup of everything on a users machine at all times:Connected DataprotectorNeed a 5/6 Terabyte NAS behind it though... PriceyMy troubleshooting is flawed to begin with, unfortunately. I'm in the Army, and we have pretty much unlimited funds to throw at our problems. I have to constantly remind myself that not every company out there is as lucky as we are when it comes to financesThrowing money at problems is a double-negative for places like ours. You're losing money on downtime, and money on getting someone else to sort it out. And someone's ALWAYS accountable when money has to be spent! Link to comment Share on other sites More sharing options...
urgan Posted June 25, 2005 Share Posted June 25, 2005 @sintaxasnI'm a little late on this thread, but facing the same problem of the hdd controller drivers, we just added this:[Sysprep]BuildMassStorageSection= Yesto sysprep.inf, just before [sysprepMassStorage] sectionBefore rebooting, sysprep adds the known drivers to the [sysprepMassStorage]section.Doesn't anyone else tried this, or had you ant issues with it ? Link to comment Share on other sites More sharing options...
sintaxasn Posted June 25, 2005 Share Posted June 25, 2005 Yep, I initially tried this method but it added about 30 minutes to the build time, as sysprep takes ages to build the SysprepMassStorage section.Instead, we prepopulate the SysprepMassStorage with the most common (see my previous posts) and didnt bother with the rest.Oh also, using BuildSysprepMassStorage didn't always work for us as it didn't take into account the Intel Chipset drivers (we dont have these added until during Sysprep).Cheers, Dan. Link to comment Share on other sites More sharing options...
fly Posted July 14, 2005 Share Posted July 14, 2005 Viper, keep in mind you've prob only got two images to worry about, PIC and APIC (whether it's UP or MP, it doesnt matter). With this in mind, we know the SMBiosD.Exe can distinguish between a PIC and APIC machine by telling us if it supports APIC.So lets try something..._____Dim oShell, oFSODim oOutputFile, aBiosString(), iBiosRecords, sCurBiosString, sAPICSet oShell = WScript.CreateObject("WScript.Shell")Set oFSO = CreateObject("Scripting.FileSystemObject")' Set our APIC value to initially be falsesAPIC = FalsesOutputFile = oShell.ExpandEnvironmentStrings("%TEMP%") & "\Bios.TXT"oShell.Run "CMD.Exe /CSMBiosD.Exe > " & sOutputFile,0,True'Read temp file into an ArrayaBiosString = Split(UCase(oFSO.OpenTextFile(sOutputFile,1,False).ReadAll),vbCrlf) iBiosRecords = CStr(UBound(aBiosString)+1)'Delete temp fileoFSO.DeleteFile sOutputFile'Find the exception we're looking forFor Each sCurBiosString in aBiosString If Instr(1,Ucase(sCurBiosString),"ON-CHIP APIC SUPPORTED",vbBinaryCompare) <> 0 Then sAPIC = True Exit For End IfNext_______As far as switching HALs, devcon's probably the way to do it, sorry I don't have more time to investigate.Cheers, Dan.<{POST_SNAPBACK}>bump. Did anyone try this? I got it to create the file, but the app appears to hang after that. I'd love to use this to just have one image... Link to comment Share on other sites More sharing options...
gfincher Posted July 14, 2005 Share Posted July 14, 2005 bump. Did anyone try this? I got it to create the file, but the app appears to hang after that. I'd love to use this to just have one image... I tried it too - dies at line 12 which is the aBiosString = Split(UCase(oFSO.OpenTextFile(sOutputFile,1,False).ReadAll),vbCrlf) line... but... I'm just a script hacker, so don't know how to fix it...Interesting thread though... Link to comment Share on other sites More sharing options...
fly Posted July 15, 2005 Share Posted July 15, 2005 I tried it too - dies at line 12 which is the aBiosString = Split(UCase(oFSO.OpenTextFile(sOutputFile,1,False).ReadAll),vbCrlf) line... but... I'm just a script hacker, so don't know how to fix it...Interesting thread though...<{POST_SNAPBACK}>Script hacker, yep thats me. Anyone? Link to comment Share on other sites More sharing options...
fly Posted July 15, 2005 Share Posted July 15, 2005 Okay, I separted out the line and the error seems to be in the Split command. Or so my lack of VB knowledge tells me... Link to comment Share on other sites More sharing options...
fly Posted July 15, 2005 Share Posted July 15, 2005 I think I fixed it, but I don't know how/why...Dim oShell, oFSODim oOutputFile, aBiosString, iBiosRecords, sCurBiosString, sAPICSet oShell = WScript.CreateObject("WScript.Shell")Set oFSO = CreateObject("Scripting.FileSystemObject")' Set our APIC value to initially be falsesAPIC = FalsesOutputFile = oShell.ExpandEnvironmentStrings("%TEMP%") & "\Bios.TXT"oShell.Run "CMD.Exe /C c:\SMBiosD.Exe > " & sOutputFile,0,True'Read temp file into an ArrayaBiosString = Split(UCase(oFSO.OpenTextFile(sOutputFile,1,False).ReadAll),vbCrlf)iBiosRecords = CStr(UBound(aBiosString)+1)'Delete temp fileoFSO.DeleteFile sOutputFile'Find the exception we're looking forFor Each sCurBiosString in aBiosStringIf Instr(1,Ucase(sCurBiosString),"ON-CHIP APIC SUPPORTED",vbBinaryCompare) <> 0 Then sAPIC = True wscript.echo "True" Exit ForEnd IfNextWhen I took the () off the variable aBiosString, it worked. I thought that signified that it was an array, and it looks like an array in the code, so hopefully someone can say why that fixed it and/or if it really did... Link to comment Share on other sites More sharing options...
fly Posted July 15, 2005 Share Posted July 15, 2005 Now I need to be able to figure out if hyperthreading is enabled, and I can use 1 image for all PCs... Link to comment Share on other sites More sharing options...
Scrapple Posted July 16, 2005 Share Posted July 16, 2005 @HTCIn the first page of this thread you say:By the way, I have a idea to auto-install all the neccessary drivers "unattended" on target PC after first start(not restart). If someone know it either, post here...------------------1) Could you tell me how you would do that?2) Where did you get the info of putting stuff directly into the registry?: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabaseand [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ServicesIs that what sysprep -reseal really does in those 15 muinutes when I run sysprep -bmsd beforehand?3) Does your method actually work with sata/scsi/raid drives? 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