Jump to content

Sysprep - Tried Everything - HELP!


Recommended Posts

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


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 by sintaxasn
Link to comment
Share on other sites

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

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

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 like

If sAPIC = True Then

        oShell.Run "DevCon <do_your_APIC_swapping_here>",1, True

End If

Dont 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 itself

Restore user data

We 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

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 :huh:

Link to comment
Share on other sites

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 Dataprotector

Need a 5/6 Terabyte NAS behind it though... Pricey

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

Throwing 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

@sintaxasn

I'm a little late on this thread, but facing the same problem of the hdd controller drivers, we just added this:

[Sysprep]
BuildMassStorageSection= Yes

to sysprep.inf, just before [sysprepMassStorage] section

Before 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

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

  • 3 weeks later...
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, oFSO

Dim oOutputFile, aBiosString(), iBiosRecords, sCurBiosString, sAPIC

Set oShell = WScript.CreateObject("WScript.Shell")

Set oFSO = CreateObject("Scripting.FileSystemObject")

' Set our APIC value to initially be false

sAPIC = False

sOutputFile = oShell.ExpandEnvironmentStrings("%TEMP%") & "\Bios.TXT"

oShell.Run "CMD.Exe /CSMBiosD.Exe > " & sOutputFile,0,True

'Read temp file into an Array

aBiosString = Split(UCase(oFSO.OpenTextFile(sOutputFile,1,False).ReadAll),vbCrlf)

iBiosRecords = CStr(UBound(aBiosString)+1)

'Delete temp file

oFSO.DeleteFile sOutputFile

'Find the exception we're looking for

For Each sCurBiosString in aBiosString

If Instr(1,Ucase(sCurBiosString),"ON-CHIP APIC SUPPORTED",vbBinaryCompare) <> 0 Then

  sAPIC = True

  Exit For

End If

Next

_______

As far as switching HALs, devcon's probably the way to do it, sorry I don't have more time to investigate.

Cheers, Dan.

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

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

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...

Script hacker, yep thats me. Anyone?

Link to comment
Share on other sites

I think I fixed it, but I don't know how/why...

Dim oShell, oFSO
Dim oOutputFile, aBiosString, iBiosRecords, sCurBiosString, sAPIC

Set oShell = WScript.CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

' Set our APIC value to initially be false
sAPIC = False
sOutputFile = oShell.ExpandEnvironmentStrings("%TEMP%") & "\Bios.TXT"
oShell.Run "CMD.Exe /C c:\SMBiosD.Exe > " & sOutputFile,0,True
'Read temp file into an Array
aBiosString = Split(UCase(oFSO.OpenTextFile(sOutputFile,1,False).ReadAll),vbCrlf)
iBiosRecords = CStr(UBound(aBiosString)+1)
'Delete temp file
oFSO.DeleteFile sOutputFile
'Find the exception we're looking for
For Each sCurBiosString in aBiosString
If Instr(1,Ucase(sCurBiosString),"ON-CHIP APIC SUPPORTED",vbBinaryCompare) <> 0 Then
 sAPIC = True
 wscript.echo "True"
 Exit For
End If
Next

When 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

@HTC

In 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\CriticalDeviceDatabase

and

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Is 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...