Jump to content

How to edit WinPE 2.0 registry offline


geemail.email

Recommended Posts

All,

I am trying to import a large number of registry entries into the WinPE 2.0 registry before unmounting and creating the ISO and need some assistance. I have attached a file to this post containing all the reg entries I would like to include within WinPE's registry.

Here is where i am at so far(thanks to assistance from Pyrosoft and others):

1. Mount the WIM

2. Run regedit and select the HKEY_LOCAL_MACHINE hive.

3. Select File | Load Hive, then browse to the location of the Windows PE build

(c:\winpe_x86\mount\windows\system32\config\systemprofile\ntuser.dat)

4. Enter a temporary name for the hive, such as WinPE.

5. Browse to WinPE node HKLM.

6. Make modifications(this is where I have number entries to add and would like to know how to do so without manually creating them one by one).

7. Select the WinPE key under HKLM

8. Select File | Unload Hive… and confirm the Yes | No dialog.

Questions:

1. How to add the entries without manually creating them?

2. How to know when I add them I am adding them into the correct key? I have reg entries for HKEY_Classes_Root, HKEY_Current_User, HKEY_Local_Machine, HKEY_USERS, and HKEY_CURRENT_CONFIG. When I load the hive above, I am only seeing Control Panel, KeyboardLayout and Software Keys.

3. Are all of the keys I am trying to import necessary. As compared to a standard Vista build, which keys does WinPE utilize?

Thank you in advance and pardon my ignorance on this topic but I am having a hard time finding documentation on the topic.

RegEntries2Add.txt

Link to comment
Share on other sites


Well, first of all there are multiple hives that you will have to load. Here are a few of them:

HKLM\SOFTWARE = mount\windows\system32\config\SOFTWARE

HKLM\SYSTEM = mount\windows\system32\config\SYSTEM

HKEY_CLASSES_ROOT = Classes key under mount\windows\system32\config\SOFTWARE

HKEY_USERS and HKEY_CURRENT_USER = Comprised of ntuser.dat files of your local user profiles (i.e. mount\Users\*\ntuser.dat)

Quite frankly the list you posted was rather long so I didn't go into it. My question is what exactly are you trying to do? There may be an easier way.

Link to comment
Share on other sites

Seems like after you have all the appropriate hives mounted you could just modify your reg file to compensate for their mounted location (just use replace in Notepad to replace something like HKEY_LOCAL_MACHINE with HKEY_LOCAL_MACHINE\MountedLocation\HKEY_LOCAL_MACHINE), import the reg, unmount and commit, and be done.

Link to comment
Share on other sites

Zorphnog:

I am attempting to get a complete installation of RAdmin 3.1 in the Boot CD to see if I get Remote IN access working. It adds quite a few reg entries and requires a restart which I am unable to replicate when just loading the app after booting from the CD.

If there is any easier way...I am all about easy cause I am pretty sure I will mess this up one way or another.

Wrex:

That sounds like a good approach to accomodating all of the reg entries at one time...have you done it this way before? The only reason I ask is you said...seems like....just curious. I am gonna give this a shot but I need to do it on a machine that is not my WAIK, VirtPC, and ISO build machine....just in case it hoses the local registry.

I will post the results of the test....thanks to both of you.....I am now armed with the info...just need to implement.

Link to comment
Share on other sites

Guys,

One other question...

Ever since I have started working with WinPE, everytime I want to test a new feature, I am going through the complete process

1. Mounting WIM

2. Installing Packages

3. Copying Custom Files

4. Installing LAN and MSD drivers

5. Committing changes

6. Creating ISO

It seems I have read somewhere(can't remember where or can't find the article now), that after I get steps 1 through 4 completed, I can make a copy of some folders so the next change I want to make, I don't have to go through the entire process each time, but rather just mount the WIM with all those modifications and then make any further mods I want and then commit and burn ISO.

I know this sounds very confusing but I am hoping it makes a little sense what I am asking.

Thanks again,

Moe

Link to comment
Share on other sites

How about just loading WinPE the way you want it. Install the software. Mount a share. Image the PE drive to the share. Use the new image as your winPe boot. I don't know if it is possible to do that, as far as installing the software on PE goes, but it would be worth a try rather than trying to enter in all those reg entries.

Link to comment
Share on other sites

Zorphnog,

If I am understanding your suggestion correctly, you are saying:

1. Build the PE boot disk with drivers, custom files, packages, etc.

2. Boot from the CD

3. Install the software app

4. Map a network drive

5. Create an image of the WinPE boot session (X:\ drive)

6. Create a boot cd using the image

The only problem I see with that process is when I have previously installed the software from within WinPE, I don't believe it is giving me the full installation as I am not getting the same install screens, similar but not exactly the same. However, I will try this method because you never know until you try.

Question....how do I take the Ghost Image (.gho) and turn that into a bootable WinPE cd?

Also, do you happen to know the answer to my previous post about saving off a certain point of the WinPE CD build so I don't have to go through all the steps every time. Even I can get your above suggestion to work, I would like to know how to avoid going through the entire build process every time.

As always....your expertise is truly appreciated!

Link to comment
Share on other sites

After you have a base WIM file (probably the winpe.wim file the WAIK walkthrough says to copy to boot.wim) after steps 1-5, you can just mount it with "imagex /mountrw PATH_TO_WIM PATH_TO_MOUNT", make any necessary changes, unmount it with "imagex /unmount PATH_TO_MOUNT /commit", re-copy it to the boot.wim location, and repeat the oscdimg command to re-build the ISO.

No, I haven't tried my suggested method of editing that reg file and importing it to a mounted hive, I was just throwing it out there for experimentation.

Link to comment
Share on other sites

Thanx Wrex.....testing is underway today, and I will let you know the results. I am trying to line out the reg changes and which hive for which reg changes.

One quick question....what is the difference between loading hive for:

mount\windows\system32\config\systemprofile\ntuser.dat

and

loading the hive for:

mount\Users\Default\ntuser.dat

Thanks,

Moe

Link to comment
Share on other sites

Wrex and Zorphnog,

I completed the registry capture of the application, loaded hives and imported reg settings. Unfortunately, my results have me experiencing the same issues I encounter when manually installing the app from within the WinPE environment. I have also requested information from the vendor of the app, they will not provide any support for PE. At this time, I have to step back from this as I must complete the boot cd and move on to v2 of our master enterprise image.

My next attempt will be with VistaPEv12. That one will take me some time as I will basically be learning VistaPE and Winbuilder from scratch. My current project list doesn't allow me to allocate the time now, but in the near future.

I will do my best to keep you apprised of any successes.

Thank you for all your help, I have learned alot through this process and although this remote app will not work using this method, it will be helpful for me to know these steps when I attempt to implement any other apps within WinPE 2.0

Until the next update.....

Moe

Link to comment
Share on other sites

  • 2 years later...

To import your registry settings to the PE hive you need to modify the path in the reg files.

In your example you enter a temporary name for the hive, such as WinPE.

Lets say I want to import the tcp registry settings to use PE Network Configurator (PENetCfg) to simplify networking functions in the PE environment.

According to the support documents from http://pierre.orgfree.com/ here are the registry keys needed to enable PENetCfg in my PE environment.

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_TCPIPREG"

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tcpipreg"

Export them to your project directory

Here are the keys, and thier subsets.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_TCPIPREG]

"NextInstance"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_TCPIPREG\0000]

"Service"="tcpipreg"

"Legacy"=dword:00000001

"ConfigFlags"=dword:00000000

"Class"="LegacyDriver"

"ClassGUID"="{8ECC055D-047F-11D1-A537-0000F8753ED1}"

"DeviceDesc"="TCP/IP Registry Compatibility"

"Capabilities"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_TCPIPREG\0000\Control]

"ActiveService"="tcpipreg"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\tcpipreg]

"DisplayName"="TCP/IP Registry Compatibility"

"ImagePath"=hex(2):53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,\

72,00,69,00,76,00,65,00,72,00,73,00,5c,00,74,00,63,00,70,00,69,00,70,00,72,\

00,65,00,67,00,2e,00,73,00,79,00,73,00,00,00

"Description"="Provides compatibility for legacy applications which interact with TCP/IP through the registry. If this service is stopped, certain applications may have impaired functionality."

"ErrorControl"=dword:00000001

"Start"=dword:00000002

"Type"=dword:00000001

"DependOnService"=hex(7):74,00,63,00,70,00,69,00,70,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\tcpipreg\Enum]

"0"="Root\\LEGACY_TCPIPREG\\0000"

"Count"=dword:00000001

"NextInstance"=dword:00000001

Now with your faVorite text editor, simply modify the hive-path so that it points to the WinPE hive you loaded into the registry editor.

The registry keys now include the path of HKLM\WinPE\SYSTEM

[HKEY_LOCAL_MACHINE\WinPE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_TCPIPREG]

"NextInstance"=dword:00000001

[HKEY_LOCAL_MACHINE\WinPE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_TCPIPREG\0000]

"Service"="tcpipreg"

"Legacy"=dword:00000001

"ConfigFlags"=dword:00000000

"Class"="LegacyDriver"

"ClassGUID"="{8ECC055D-047F-11D1-A537-0000F8753ED1}"

"DeviceDesc"="TCP/IP Registry Compatibility"

"Capabilities"=dword:00000000

[HKEY_LOCAL_MACHINE\WinPE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_TCPIPREG\0000\Control]

"ActiveService"="tcpipreg"

[HKEY_LOCAL_MACHINE\WinPE\SYSTEM\CurrentControlSet\services\tcpipreg]

"DisplayName"="TCP/IP Registry Compatibility"

"ImagePath"=hex(2):53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,00,\

72,00,69,00,76,00,65,00,72,00,73,00,5c,00,74,00,63,00,70,00,69,00,70,00,72,\

00,65,00,67,00,2e,00,73,00,79,00,73,00,00,00

"Description"="Provides compatibility for legacy applications which interact with TCP/IP through the registry. If this service is stopped, certain applications may have impaired functionality."

"ErrorControl"=dword:00000001

"Start"=dword:00000002

"Type"=dword:00000001

"DependOnService"=hex(7):74,00,63,00,70,00,69,00,70,00,00,00,00,00

[HKEY_LOCAL_MACHINE\WinPE\SYSTEM\CurrentControlSet\services\tcpipreg\Enum]

"0"="Root\\LEGACY_TCPIPREG\\0000"

"Count"=dword:00000001

"NextInstance"=dword:00000001

Now simply use your favorite registry editor to import your settings to the WinPE Hive.

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