Jump to content

How to create an OEM folder


Recommended Posts

Feel free to add information or answer ?.

I have been asked this so many times here and elsewhere I wanted to put together 1 post with all the relevant information that anyone here can add to.

Microsoft Understanding Distribution Shares and Configuration Sets

Go get the Windows 7 SP1 original iso here. straight from MS

http://www.askvg.com/direct-download-links-download-official-original-and-untouched-windows-7-iso-32-bit-and-64-bit/

more languages here http://www.heidoc.net/joomla/technology-science/microsoft/14-windows-7-direct-download-links

As long as they are coming from msft.digitalrivercontent.net they are valid MS downloads

These are authentic Microsoft. Much better than getting from an unknown untrusted source

These are genuine and official download links. Its completely LEGAL to use them as they don't come with a product key. You'll need to use your own product key to activate Windows. The links provide an untouched Windows 7 ISO which is a fully functional 30-day trial version which can be converted into full version after entering your product key and activating it.

Now open admin cmd prompt and type slmgr -xpr | slmgr -dlv

if OEM then then under description it will say OEM_SLP channel

post-9484-0-26304900-1312638835_thumb.pn

if it is installed with COA from sticker on side it most likely will say COA in the channel

This will explain that http://www.mydigitallife.info/differences-between-oem-channel-slp-nonslp-and-coa-license-product-keys/

Extract your iso to a folder on any drive like DVD. Inside \sources folder of that create $OEM$ folder and then add other folders as needed.

The main folder needed is $$\Setup\Scripts and $$\System32\OEM

DVD\sources\$OEM$
$$ <<- C:\Windows
$$\Web\Wallpaper <<- Wallpapers here
$$\Setup\Scripts <<- setupcomplete.cmd, OOBE.CMD, OEM.reg, SLP.cmd
$$\System32
$$\System32\OEM <<- OEM *.xrm-ms, OEM logos. you can copy these folders from Windows\System32\OEM
$$\SYSWOW64\OEM <<- replica of system32\oem for 64 bit systems OEM *.xrm-ms, OEM logos. you can copy these folders from Windows\System32\OEM
$$\System32\oobe
$1 <<- Drive Root
$1\Drivers <<- where some OEM place driver files
$1\Install <<- where I place most things and call from there. EX: %SystemRoot%\Install\Firstlog.cmd
$1\ProgramData\Hewlett-Packard\images <<- example of what we are looking for

To capture your actual product key you can use this simple vb script. This captures actual key and not the one on COA sticker.

If you have installed using the COA then you will have to capture the 2 files below and add to the install.wim listed in NON OEM

http://www.mediafire.com/?zv4bu6cn0h8bbfk

Selecting Image or Version

How to Choose Desired Windows 7 Edition / Version During Setup?

or just delete or rename the ei.cfg in \sources folder

If you have an OEM PC you can mount your recovery image install.wim and you will find most these files. Look for .cmd, .vbs in the above folders

I have used following run from a cmd prompt as Admin to gain access to recovery partition

echo y| icacls "F:\*" /grant Administrators:F /T
echo y| icacls "F:\*" /grant *S-1-5-32-544:F /T
attrib -R -A -S -H "F:\" /S /D

To activate all we really need is just add a setupcomplete.cmd in $$\Setup\Scripts with the .XRM-MS located in SYSTEM32\OEM

setupcomplete.cmd run's automatically in this location. It also run's invisible so will not show anything except applications installing. Not good to call .cmd files here

setupcomplete.cmd

cscript %windir%\system32\slmgr.vbs -ilc %windir%\SYSTEM32\OEM\*.*.XRM-MS
cscript %windir%\system32\slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Drivers

Windows 7 has good driver support but if you have some kind of new device needed drivers then you may want to capture drivers and inject them

Driver Magician Lite free

Can use my Add Right click .wim Windows 7 for these operations.

Adding Boot critical and all other drivers to an OEM installation if you don't want to inject - tested and working in a VM today

Only .inf drivers can be added to a Windows image by using this procedure. Drivers packaged as an .exe file or other file types must be installed on a running Windows operating system.

Create folder on root of DVD called $WinPEDriver$

Add all your driver folders there. Drivers must be extracted. You can see from my image long path names are acceptable :thumbup

Add this to your AutoUnattend.xml in <settings pass="windowsPE">


<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
<Path>$WinPEDriver$</Path>
</PathAndCredentials>
</DriverPaths>
</component>

2011-08-08 10:13:03, Info                         PnPIBS: Checking for pre-configured driver directory D:\$WinPEDriver$.
2011-08-08 10:13:03, Info PnPIBS: Found pre-configured driver directory D:\$WinPEDriver$.
2011-08-08 10:13:03, Info PnPIBS: Building the list of drivers in the path D:\$WinPEDriver$ ...
2011-08-08 10:13:03, Info PnPIBS: Added driver D:\$WinPEDriver$\Intel(R) ICH10 Family PCI Express Root Port 1\ichacore.inf to the list of drivers.

post-9484-0-92949600-1312820383_thumb.pn

NON OEM

If you don't have an OEM we capture and save 2 files from your existing installation

We then mount and insert these files into the install.wim. Can use my right click .wim for these operations, it has an uninstall when you are done with it.

Add Right click .wim Windows 7

The 2 files we need

C:\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms

C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat

or

You can simply install and enter product key to activate.

Edited by maxXPsoft
Link to comment
Share on other sites


If you want to add an AutoUnattend.xml then look here

When you go to select image that you will be mounting please look here

Make sure you get the right Index number

64 bit iso will contain these images normally except Windows 7 STARTER

Details for image : D:\CD DVD\en_windows_7_ultimate_with_sp1_x64_dvd_u_677332\sources\install.wim

Index : 1
Name : Windows 7 HOMEBASIC
Description : Windows 7 HOMEBASIC
Size : 11,710,161,360 bytes

Index : 2
Name : Windows 7 HOMEPREMIUM
Description : Windows 7 HOMEPREMIUM
Size : 12,222,587,449 bytes

Index : 3
Name : Windows 7 PROFESSIONAL
Description : Windows 7 PROFESSIONAL
Size : 12,122,886,417 bytes

Index : 4
Name : Windows 7 ULTIMATE
Description : Windows 7 ULTIMATE
Size : 12,285,492,779 bytes

32 bit iso will contain these images

Details for image : D:\CD DVD\en_windows_7_ultimate_with_sp1_x86_dvd_u_677460\sources\install.wim

Index : 1
Name : Windows 7 STARTER
Description : Windows 7 STARTER
Size : 8,074,968,070 bytes

Index : 2
Name : Windows 7 HOMEBASIC
Description : Windows 7 HOMEBASIC
Size : 8,127,590,116 bytes

Index : 3
Name : Windows 7 HOMEPREMIUM
Description : Windows 7 HOMEPREMIUM
Size : 8,569,006,173 bytes

Index : 4
Name : Windows 7 PROFESSIONAL
Description : Windows 7 PROFESSIONAL
Size : 8,450,188,760 bytes

Index : 5
Name : Windows 7 ULTIMATE
Description : Windows 7 ULTIMATE
Size : 8,610,128,720 bytes

Edited by maxXPsoft
Link to comment
Share on other sites

I added

<DriverPaths>

<PathAndCredentials wcm:action="add">

<Path>$WinPEDriver$</Path>

</PathAndCredentials>

</DriverPaths>

And SIM keeps saying that the "key" must have a value. Should I ignore it and proceed anyway?

Link to comment
Share on other sites

  • 4 weeks later...

I am getting the following error in virtual box. "Windows Setup could not install one or more boot-critical drivers. To install Windows, make sure that the drivers are valide, and restart the installation." This is when i do the $WinPEDriver$ thing.

Nevermind, I think its bad driver files. I removed a folder and it got past that step. But now for some reason its refering to wim file thats not even associated with this install.going to start it over. I guess I need a way for it to not even look for a wim file.

Edited by gotenks98
Link to comment
Share on other sites

Did you remove or rename the ei.cfg? That will install whatever image it was intended for

[EditionID]

Professional

Without removing the ei.cfg you need to specify image to install in the xml. Look at <ImageInstall> here

<Value>Windows 7 ULTIMATE</Value>

EDIT: http://technet.microsoft.com/en-us/library/dd744535%28WS.10%29.aspx

If you use an answer file during Windows installation, Windows Setup ignores the EI.cfg file.
Edited by maxXPsoft
Link to comment
Share on other sites

  • 1 year later...

This is great when adding or replacing files. But what about removing files?

I was thinking maybe adding bogus 0 byte hidden files to replace the files i want to delete from the image.

When i mount the WIM and run the script to take ownership and force delete the said files then mostly it fails with "Access Denied".

This the delete script:

REM Take Ownership:
takeown /F "D:\7Work\WIM1" /R /D Y

REM Remove/Delete:
del /f /s /q "D:\7Work\WIM1\Windows\Help"
del /f /s /q "D:\7Work\WIM1\Windows\LiveKernelReports"
del /f /s /q "D:\7Work\WIM1\Windows\Media\*"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Ease of Access Themes\classic.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Ease of Access Themes\hc1.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Ease of Access Themes\hc2.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Ease of Access Themes\hcblack.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Ease of Access Themes\hcwhite.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Themes\architecture.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Themes\characters.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Themes\landscapes.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Themes\nature.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Resources\Themes\scenes.theme"
del /f /s /q "D:\7Work\WIM1\Windows\Web"
del /f /s /q "D:\7Work\WIM1\Windows\HelpPane.exe"
del /f /s /q "D:\7Work\WIM1\Windows\SysWOW64\ssText3d.scr"
del /f /s /q "D:\7Work\WIM1\Windows\SysWOW64\Bubbles.scr"
del /f /s /q "D:\7Work\WIM1\Windows\SysWOW64\Mystify.scr"
del /f /s /q "D:\7Work\WIM1\Windows\SysWOW64\PhotoScreensaver.scr"
del /f /s /q "D:\7Work\WIM1\Windows\SysWOW64\Ribbons.scr"
del /f /s /q "D:\7Work\WIM1\Windows\System32\wdi\LogFiles\BootCKCL.etl"
del /f /s /q "D:\7Work\WIM1\Windows\System32\wdi\LogFiles\ShutdownCKCL.etl"
del /f /s /q "D:\7Work\WIM1\Windows\System32\ssText3d.scr"
del /f /s /q "D:\7Work\WIM1\Windows\System32\Bubbles.scr"
del /f /s /q "D:\7Work\WIM1\Windows\System32\Mystify.scr"
del /f /s /q "D:\7Work\WIM1\Windows\System32\PhotoScreensaver.scr"
del /f /s /q "D:\7Work\WIM1\Windows\System32\Ribbons.scr"
del /f /s /q "D:\7Work\WIM1\ProgramData\Microsoft\User Account Pictures\Default Pictures\*"
del /f /s /q "D:\7Work\WIM1\PerfLogs"
del /f /s /q "D:\7Work\WIM1\ProgramData\Microsoft\Windows Defender"
del /f /s /q "D:\7Work\WIM1\ProgramData\Microsoft\Windows\Ringtones"
del /f /s /q "D:\7Work\WIM1\Users\Administrator\Favorites\Links"
del /f /s /q "D:\7Work\WIM1\Users\Administrator\Favorites\Microsoft Websites"
del /f /s /q "D:\7Work\WIM1\Users\Administrator\Favorites\MSN Websites"
del /f /s /q "D:\7Work\WIM1\Users\Administrator\Favorites\Windows Live"
del /f /s /q "D:\7Work\WIM1\Users\Administrator\AppData\Local\Microsoft\Media Player\Sync Playlists\et-EE\00010C6E"
del /f /s /q "D:\7Work\WIM1\Users\Administrator\AppData\Local\Microsoft\Windows Mail"
del /f /s /q "D:\7Work\WIM1\Users\Administrator\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Desktop.ini"
del /f /s /q "D:\7Work\WIM1\Program Files\Windows Defender"
del /f /s /q "D:\7Work\WIM1\Program Files\Windows Mail"
del /f /s /q "D:\7Work\WIM1\Program Files\Windows Media Player\wmpnetwk.exe"
del /f /s /q "D:\7Work\WIM1\Program Files\Windows Media Player\wmpnscfg.exe"
del /f /s /q "D:\7Work\WIM1\Program Files\Windows Media Player\Network Sharing"
del /f /s /q "D:\7Work\WIM1\Program Files\Windows Sidebar\Gadgets\*"
del /f /s /q "D:\7Work\WIM1\Program Files (x86)\Windows Defender"
del /f /s /q "D:\7Work\WIM1\Program Files (x86)\Windows Mail"
del /f /s /q "D:\7Work\WIM1\Program Files (x86)\Windows Sidebar\Gadgets\*"

Link to comment
Share on other sites

takeown /F "D:\7Work\WIM1" /R /D Y

you probably need icacls to grant permissions to you as 'Administrators' with Administrators name in your language

I don't think it would be good to do whole WIM folder, try to get the sub folders

try instead

cmd.exe /c takeown /f "D:\7Work\WIM1\Windows\Resources" /R && icacls "D:\7Work\WIM1\Windows\Resources" /grant Administrators:F /t

should see a window with it applying

Edited by maxXPsoft
Link to comment
Share on other sites

  • 2 months later...

Maxx, can you think of any explanation why $WinPEDriver$ method works in VM but not on real machine with exactly the same image used?

Also, are you aware of any limitations of this, like for example total amount of files in the folder or size of any subfolders that might be there?

Link to comment
Share on other sites

Maxx, can you think of any explanation why $WinPEDriver$ method works in VM but not on real machine with exactly the same image used?

Also, are you aware of any limitations of this, like for example total amount of files in the folder or size of any subfolders that might be there?

Mine has worked on real install actual also. Just first test was VM. Perhaps look at setupact.log and see what happened?

Limitations of $WinPeDriver$ when used in conjunction with other driver injection methods

Link to comment
Share on other sites

It did work for me as well, but it's acting up really weird at times.

I also suspect it of not working well with Intel chipset drivers, but I'd need to test it a lot more.

It could also be something completely else being fishy, because very often setup would show me the language and keyboard settings screen (it's not supposed to with automated installation) and freeze up at the very moment, and I have to reset the whole thing. Other times (much less often) I'd get weird error messages about no driver for the drive/controller/whatever I am installing from, and browse for files... option. There's definitely nothing wrong with my either PC or the flash drive I have. It also sometimes happened when I was still installing from a DVD. It's really annoying and I could never figure out the cause.

Link to comment
Share on other sites

I have Intel also

From a running system with updated drivers I capture with Driver Magician Lite

Only select the ones in Red that are not MS.

Windows update will sometimes offer a newer or so called newer and I update my driver folder by capturing new from C:\Windows\System32\DriverStore\FileRepository\

Example: found the c7112964.inf.xxxx folder, and copied it for use

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