Creating LEGACY_NULL Via Registry Script

F

Frank Natoli

www.xpefiles.com has a post to create a WinXPe NUL device using the
below registry script. RegEdt32.exe is able to create the Class data,
then fails on the LEGACY_NULL data. A C++ program of my own devise
fails in the same place with "access denied". Yes, I have admin rights.
Although using T/D to build a WinXPe image with NUL is the "best"
solution, that is problematic in my context because (1) my WinXPe
component database strangely does not contain NULL.SYS nor LEGACY_NULL
nor anything relevant to NUL, and (2) the system experiencing this
problem [using Apache web services] is locked in a secure location and
changing its WinXPe compact flash will be a royal pain. What might be
preventing the below REG data from being imported?


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{8ECC055D-047F-11D1-A537-0000F8753ED1}]

"Class"="LegacyDriver"
@="Non-Plug and Play Drivers"
"NoDisplayClass"="1"
"SilentInstall"="1"
"NoInstallClass"="1"
"EnumPropPages32"="SysSetup.Dll,LegacyDriverPropPageProvider"
"Icon"="-19"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_NULL]
"NextInstance"=dword:00000001

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

"Service"="Null"
"Legacy"=dword:00000001
"ConfigFlags"=dword:00000020
"Class"="LegacyDriver"
"ClassGUID"="{8ECC055D-047F-11D1-A537-0000F8753ED1}"
"DeviceDesc"="Null"
"Capabilities"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_NULL\0000\LogConf]


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

"ActiveService"="Null"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Null]
"ErrorControl"=dword:00000001
"Group"="Base"
"Start"=dword:00000001
"Tag"=dword:00000001
"Type"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Null\Enum]
"0"="Root\\LEGACY_NULL\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001


Copy null.sys on %systemdrive%\system32\drivers

Reboot
 
S

Sean Liming \(eMVP\)

There is a Null Device Driver component in the XPe Database. It has been
there at least since SP1. Is this soemthing you are looking for?


Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
Toolkit
 
S

steves

I notice you have "ControlSet001" in the first key and
"CurrentControlSet" in the others, which probably doesn't matter,
but....

I would guess that the Enum\Root key is already present, but you could
try adding some
extra statements to make sure the path is fully realized, like this:

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


Finally, I exported the same keys from my XPE desktop system. The
class and service keys are the same as yours, but I have a slight
differences from yours in the Enum\Root\LEGACY_NULL branch, as follows:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_NULL\0000]
"Driver"="{8ECC055D-047F-11D1-A537-0000F8753ED1}\\0023"

(All other keys are same as yours)


Steves


Frank said:
www.xpefiles.com has a post to create a WinXPe NUL device using the
below registry script. RegEdt32.exe is able to create the Class data,
then fails on the LEGACY_NULL data. A C++ program of my own devise
fails in the same place with "access denied". Yes, I have admin rights.
Although using T/D to build a WinXPe image with NUL is the "best"
solution, that is problematic in my context because (1) my WinXPe
component database strangely does not contain NULL.SYS nor LEGACY_NULL
nor anything relevant to NUL, and (2) the system experiencing this
problem [using Apache web services] is locked in a secure location and
changing its WinXPe compact flash will be a royal pain. What might be
preventing the below REG data from being imported?


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{8ECC055D-047F-11D1-A537-0000F8753ED1}]

"Class"="LegacyDriver"
@="Non-Plug and Play Drivers"
"NoDisplayClass"="1"
"SilentInstall"="1"
"NoInstallClass"="1"
"EnumPropPages32"="SysSetup.Dll,LegacyDriverPropPageProvider"
"Icon"="-19"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_NULL]
"NextInstance"=dword:00000001

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

"Service"="Null"
"Legacy"=dword:00000001
"ConfigFlags"=dword:00000020
"Class"="LegacyDriver"
"ClassGUID"="{8ECC055D-047F-11D1-A537-0000F8753ED1}"
"DeviceDesc"="Null"
"Capabilities"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_NULL\0000\LogConf]


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

"ActiveService"="Null"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Null]
"ErrorControl"=dword:00000001
"Group"="Base"
"Start"=dword:00000001
"Tag"=dword:00000001
"Type"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Null\Enum]
"0"="Root\\LEGACY_NULL\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001


Copy null.sys on %systemdrive%\system32\drivers

Reboot
 
Joined
May 3, 2009
Messages
1
Reaction score
0
i had the same problem as the OP. i had to go into regedit and change the permissions for HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root so that administrator could have full access. then the script ran fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top