Jump to content

First time playing with the $OEM$ Folder problems


ElmerBeFuddled

Recommended Posts

This is the first time I've played with the $OEM$ folder and I'm getting lost!!

I'm trying to run a setupcomplete.cmd to add five updates that never seem to take (for me) and some reg files.

I've realised that HKCU needs to go after first logon so I'm trying to get setupcomplete.cmd to add a runonceex key that will launch firstlogon.cmd. But nothing seems to be working!

These are my ( crappy?? :D ) files:

setupcomplete.cmd


@echo off

SET "LOGFILE=%systemdrive%\SetUp Install.log"

WUSA Windows6.1-KB2533552-x64.msu /QUIET /NORESTART

WUSA Windows6.1-KB917607-x64.msu /QUIET /NORESTART

WUSA Windows6.1-KB2592687-x64.msu /QUIET /NORESTART

WUSA Windows6.1-KB2603229-x64.msu /QUIET /NORESTART

Regedit /s "ALMERCONS x64.reg"

Regedit /s "#1.reg"

Regedit /s "#2.reg"

Regedit /s "#3.reg"

Regedit /s "#4.reg"

Regedit /s "RunOnce.reg"

RunOnce.reg


Windows Registry Editor Version 5.00

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "User Reg Entries" "C:\Windows\Setup\Scripts\firstlogon.cmd" /f
REG ADD %KEY% /v Flags /t REG_DWORD /d "20" /f

I added the updates into firstlogon as they don't appear after running the setupcomplete. Obviously if setupcomplete isn't running correctly then firstlogon won't be running!! All the HKCU entries from the above reg files are in the below reg files

firstlogon.cmd


@echo off

WUSA Windows6.1-KB2533552-x64.msu /QUIET /NORESTART

WUSA Windows6.1-KB917607-x64.msu /QUIET /NORESTART

WUSA Windows6.1-KB2592687-x64.msu /QUIET /NORESTART

WUSA Windows6.1-KB2603229-x64.msu /QUIET /NORESTART

del /q /f /a:h "C:\Users\Public\Desktop\desktop.ini"

del /q /f /a:h "C:\Users\Elmer B. Fuddled\Desktop\desktop.ini"

Regedit /s "User ALMERCONS x64.reg"

Regedit /s "User #1.reg"

Regedit /s "User #2.reg"

Regedit /s "User #3.reg"

Regedit /s "User #4.reg"

Now. No laughing too loud, I know where you live!! :w00t: :D

EDIT:

I also believe I can run the firstlogon from the autounattend but that'd probably lose me even more

Edited by ElmerBeFuddled
Link to comment
Share on other sites

Well I've had a change of heart and decided to try and run from the autounattend.xml. That wouldn't work at all (the xml) to start with, it was only when I was going to add a number to the name end I noticed a space between the 'attend' and '.xml' !!!!

So the first logon does what it should when I run it manually, the xml does what it should EXCEPT launching the firstlogon.cmd file.

autounattend.xml

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" 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">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>0809:00000809</InputLocale>
<SystemLocale>en-GB</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-GB</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" 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">
<Diagnostics>
<OptIn>false</OptIn>
</Diagnostics>
<DynamicUpdate>
<Enable>false</Enable>
<WillShowUI>onerror</WillShowUI>
</DynamicUpdate>
<EnableFirewall>true</EnableFirewall>
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>Elmer B. Fuddled</FullName>
<Organization>FEELGOOD-iNC</Organization>
</UserData>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Security-SPP-UX" 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">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<ComputerName>FEELGOOD-iNC</ComputerName>
<TimeZone>GMT Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-IE-InternetExplorer" 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">
<DisableOOBAccelerators>true</DisableOOBAccelerators>
<DisableFirstRunWizard>true</DisableFirstRunWizard>
<EnableLinksBar>false</EnableLinksBar>
<Home_Page>http://www.carrona.org/dvrref.php</Home_Page>
<BlockPopups>yes</BlockPopups>
<SuggestedSitesEnabled>false</SuggestedSitesEnabled>
<PlaySound>false</PlaySound>
<ShowInformationBar>true</ShowInformationBar>
<ShowMenuBar>true</ShowMenuBar>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" 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">
<!--ORIGINAL InputLocale>0809:00000809</InputLocale>
<SystemLocale>en-GB</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-GB</UserLocale-->
<SystemLocale>en-GB</SystemLocale>
<UILanguage>en-GB</UILanguage>
<UserLocale>0809:00000809</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<TimeZone>GMT Standard Time</TimeZone>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<AutoLogon>
<Password>
<Value />
</Password>
<Enabled>false</Enabled>
<Username>Elmer B. Fuddled</Username>
</AutoLogon>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value />
</Password>
<DisplayName>Elmer B. Fuddled</DisplayName>
<Name>Elmer B. Fuddled</Name>
<Group>Administrators</Group>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>cmd /C %windir%\Setup\Scripts\FirstLogon.cmd</CommandLine>
<Description>Run FirstLogon.cmd</Description>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
</unattend>
<!--Customized by myselfidem. For Windows 7 AIO all images-->
<!--OS to install and Disk Configuration dialog boxes will be displayed.-->

Any pointers?

OFF TOPIC. BTW myselfidem, I'm loving your setproductkey file! By adding a pause before it unmounts gives me a chance to drop all my folders into the image

Edited by ElmerBeFuddled
Link to comment
Share on other sites

  • 2 weeks later...

actually i thought the oem folder was copied on all oem installs. i guess not :P  (and explains why i could not find it lol)

 i was trying to find a copy of my certificate..i figured it would be in an oem folder under sources?

i didn't look on the recovery image. maybe its there.

Edited by ccl0
Link to comment
Share on other sites

  • 1 month later...

I keep trying to use $OEM$ for Setupcomplete.cmd and files and setup never copies them over. If I put the scripts and files directly into Windows ==> Setup ==> Scripts in the WIM they work fine.

 

In the “sources” folder (the same folder the install wim is in) I have the following folder structure: $OEM$ ==> $$ ==> Setup ==> Scripts (sources\$OEM$\$$\Setup\Scripts\). I am expecting them to be copied to Windows\Setup\Scripts\ but they are not.

 

System is x64, OS is Win 7 SP1 Ultimate or HomePremium (X17-59465). I have tested this with VMPlayer using the install from iso file option and installing to VHD using a USB stick and neither copies the files over. Is there something else I need to do to make this copy over? Everything I have read on the net seems to indicate that this happens automatically. I thought maybe VM was interfering with a $OEM$ that took precedence but then I had the same problem with VHD.

What am I missing or what would cause Setup not to copy the contents of $OEM$ to the drive the OS is being installed on?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...