Jump to content

Create I386 folder


Recommended Posts

So far the only way I can figure out to create the c:\i386 folder is to place it in the $OEM$\$1 folder. Is there a more disk space efficient method, such as creating it from the \remoteinstall\setup\english\images\imagename\i386 folder. The method that we have come up with seems terribly inefficient.

Thanks for the Help

Bn2Hunt

Edited by bn2hunt
Link to comment
Share on other sites


Yes, the I386 folder is created on the RIS Server but we need it copied to the new pc's as they are installed.

Unless I am doing something wrong, very possible, the folder is not created on the new pc's, so when we add a component it asks for the c:\i386 folder, which unless we add it to the $oem$\$1 folder it doesn't get created.

bn2hunt

Link to comment
Share on other sites

Only a problem for me on "road warrior" laptops that are bound to be without access to RIS but needing the i386 directory. I actually keep a "full' copy (because RiSetup does remove some necessary files, ultimately) in my ris folder and copy the whole i386 to C:\ if I detect a laptop during build. Desktops, obviously, don't get this treatment because there's usually no need.

Link to comment
Share on other sites

Hmmm.. I never thought about that one. I think that I may implement that idea in my script pack using the same logic to detect chassis type for VPN client installs. That's a real good point that I'm surprised I didn't think about before. I'm VPNed in to my network quite a bit and my laptop reached out to the RIS server for some files once. Talk about slow going.

Link to comment
Share on other sites

I'm sure you've got a way to do this, but I love writing this value to the registry since the possibility of the machine that the OS is on changing is very slim and it doesn't make sense to keep determining ths in subsequent scripts - a simple registry read suffices later.

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Setup"
objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colChassis = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objChassis in colChassis
For Each strChassisType in objChassis.ChassisTypes
Select Case strChassisType
Case 1
strEntryName = "MACHINETYPE"
strValue = "Other"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 2
strEntryName = "MACHINETYPE"
strValue = "Unknown"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 3
strEntryName = "MACHINETYPE"
strValue = "Desktop"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 4
strEntryName = "MACHINETYPE"
strValue = "Low_Profile_Desktop"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 5
strEntryName = "MACHINETYPE"
strValue = "Pizza_Box"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 6
strEntryName = "MACHINETYPE"
strValue = "Mini_Tower"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 7
strEntryName = "MACHINETYPE"
strValue = "Tower"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 8
strEntryName = "MACHINETYPE"
strValue = "Portable"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 9
strEntryName = "MACHINETYPE"
strValue = "Laptop"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 10
strEntryName = "MACHINETYPE"
strValue = "Notebook"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 11
strEntryName = "MACHINETYPE"
strValue = "Handheld"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 12
strEntryName = "MACHINETYPE"
strValue = "Docking_Station"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 13
strEntryName = "MACHINETYPE"
strValue = "All-in-One"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 14
strEntryName = "MACHINETYPE"
strValue = "Sub-Notebook"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 15
strEntryName = "MACHINETYPE"
strValue = "Space_Saving"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 16
strEntryName = "MACHINETYPE"
strValue = "Lunch_Box"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 17
strEntryName = "MACHINETYPE"
strValue = "Main_System_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 18
strEntryName = "MACHINETYPE"
strValue = "Expansion_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 19
strEntryName = "MACHINETYPE"
strValue = "Sub-Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 20
strEntryName = "MACHINETYPE"
strValue = "Bus_Expansion_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 21
strEntryName = "MACHINETYPE"
strValue = "Peripheral_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 22
strEntryName = "MACHINETYPE"
strValue = "Storage_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 23
strEntryName = "MACHINETYPE"
strValue = "Rack_Mount_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case 24
strEntryName = "MACHINETYPE"
strValue = "Sealed-Case_PC"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
Case Else
strEntryName = "MACHINETYPE"
strValue = "Unknown"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
End Select
Next
Next

Link to comment
Share on other sites

We copy the I386 folder to all pc's and laptops since we have alot of remote offices across the country that we are responsible for. And we don't want the pc's phoning home everytime we add a component. This is how I have been trying it so far. The RunOnceEx.cmd runs but either I have the source.cmd coded incorrectly or it never executes, I'm not sure which.

Does anyone else copy the files this way?

CMDLINES.TXT

[Commands]
"rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\OEM.INF"
"cmd /c start /min cmd /c .\OEMLink.bat"
"cmd /c start /min cmd /c .\USBS3KB.BAT"
"RunOnceEx.cmd"
"source.cmd"
"REGEDIT /S regtweaks.reg"
"rundll32 advpack.dll,LaunchINFSection nLite.inf,nLiteReg"
"admin.cmd"

; Customized by nLite - www.nliteos.com

SOURCE.CMD

cmdow @ /HID
@echo off

set cdrom = "\\SERVERNAME\REMINST\Setup\English\Images\DellGX620"

c:\windows\system32\xcopy /E /H "%cdrom%\i386" "%systemroot%\i386\"

Edited by bn2hunt
Link to comment
Share on other sites

I personally just make a hardware determination, and copy based on desktop/laptop, and it runs in a vbscript in my RunOnceEx like so:

' // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' // Set variables for script
' //

Set objShell = CreateObject("WSCript.shell")
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Setup"
objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colChassis = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")


' // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' // Determine machine hardware and copy i386 for laptops
' //

For Each objChassis in colChassis
For Each strChassisType in objChassis.ChassisTypes
Select Case strChassisType

Case 1
strEntryName = "MACHINETYPE"
strValue = "Other"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 2
strEntryName = "MACHINETYPE"
strValue = "Unknown"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 3
strEntryName = "MACHINETYPE"
strValue = "Desktop"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 4
strEntryName = "MACHINETYPE"
strValue = "Low_Profile_Desktop"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 5
strEntryName = "MACHINETYPE"
strValue = "Pizza_Box"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 6
strEntryName = "MACHINETYPE"
strValue = "Mini_Tower"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 7
strEntryName = "MACHINETYPE"
strValue = "Tower"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 8
strEntryName = "MACHINETYPE"
strValue = "Portable"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 9
strEntryName = "MACHINETYPE"
strValue = "Laptop"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 10
strEntryName = "MACHINETYPE"
strValue = "Notebook"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 11
strEntryName = "MACHINETYPE"
strValue = "Handheld"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 12
strEntryName = "MACHINETYPE"
strValue = "Docking_Station"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 13
strEntryName = "MACHINETYPE"
strValue = "All-in-One"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 14
strEntryName = "MACHINETYPE"
strValue = "Sub-Notebook"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"

Case 15
strEntryName = "MACHINETYPE"
strValue = "Space_Saving"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 16
strEntryName = "MACHINETYPE"
strValue = "Lunch_Box"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 17
strEntryName = "MACHINETYPE"
strValue = "Main_System_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 18
strEntryName = "MACHINETYPE"
strValue = "Expansion_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 19
strEntryName = "MACHINETYPE"
strValue = "Sub-Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 20
strEntryName = "MACHINETYPE"
strValue = "Bus_Expansion_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 21
strEntryName = "MACHINETYPE"
strValue = "Peripheral_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 22
strEntryName = "MACHINETYPE"
strValue = "Storage_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 23
strEntryName = "MACHINETYPE"
strValue = "Rack_Mount_Chassis"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case 24
strEntryName = "MACHINETYPE"
strValue = "Sealed-Case_PC"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue

Case Else
strEntryName = "MACHINETYPE"
strValue = "Unknown"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strValue
objShell.Run "robocopy \\RISserver\REMINST\full_source_xpsp2 %systemdrive%\i386 /E"
End Select
Next
Next

Link to comment
Share on other sites

Cool.

I do more based on the hardware type, but I figured a good primer on how to do things based on type would help someone. My clients I support actually install almost all differing software configurations based on type, so this script is actually getting to be really involved :).

Link to comment
Share on other sites

Interesting.. I've also started to do things along those lines. Like reg tweaks based on reported clock speed or special button drivers on laptops based on the presence of hwids. My favorite though is that script sample you found for setting the speed and duplex on a nic. That's really saved me a lot of time and grief.

Link to comment
Share on other sites

Yeah, ripped my hair out on that one before I found the script sample :P

I love your adaptation of that too in your script pack. I've modified it and use it in my RIS installs on all machines, and it works great.

Edited by cluberti
Link to comment
Share on other sites

  • 5 months later...

Howdy,

Just thought I'd share what I am doing for this situation. It's nothing fancy, but it's simple and works well..

RunOnceEx.cmd

REG ADD %KEY%\035 /VE /D "Creating Local Installation Source" /f

REG ADD %KEY%\035 /V 1 /D "%systemdrive%\Install\i386.cmd" /f

i386.cmd

cmdow @ /HID

net use z: \\ris\REMINST\Setup\English\Images\WindowsXP_Pro_SP2\i386 /USER:DOMAIN\USER password

xcopy "z:\*.*" "C:\Install\i386\*.*" /s /y

net use z: /delete

exit

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