rajesh.kumar Posted October 19, 2008 Share Posted October 19, 2008 (edited) During installation of xp, i run bootlogo.cmd to select the suitable kernel to load during windows boot. i have all the kernels(modified) in system32 dir.The code works well to identify dual or single core. Problem is in the 2nd para where it has to detect whether normal or PhysicalAddressExtension kernel.Can someone guide me in this issue?Clue is that NUMBER_OF_PROCESSORS is reg_sz (decimal)and PhysicalAddressExtension is reg_dword (hex).bootlogo.cmd---------------FOR /F "tokens=3 delims= " %%A IN (\'REG QUERY "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v NUMBER_OF_PROCESSORS\') DO SET NUMBER_OF_PROCESSORS=%%Aif %NUMBER_OF_PROCESSORS%==2 goto DUALFOR /F "tokens=3 delims= " %%i IN (\'REG QUERY "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management" /v PhysicalAddressExtension\') DO SET PhysicalAddressExtension=%%iif %PhysicalAddressExtension%==0x1 goto SPAEbootcfg /copy /D "Load using default singleprocessor kernel" /ID 1bootcfg /RAW "/Kernel=KrnlS.exe /SOS" /A /ID 1bootcfg /RAW "/SOS" /A /ID 2goto End:SPAEbootcfg /copy /D "Load using default Singleprocessor PAE kernel" /ID 1bootcfg /RAW "/Kernel=KrnlSpa.exe /SOS" /A /ID 1bootcfg /RAW "/SOS" /A /ID 2goto End:DUALFOR /F "tokens=3 delims= " %%i IN (\'REG QUERY "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management" /v PhysicalAddressExtension\') DO SET PhysicalAddressExtension=%%iif %PhysicalAddressExtension%==0x1 goto MPAEbootcfg /copy /D "Load using default multiprocessor/HT kernel" /ID 1bootcfg /RAW "/Kernel=KrnlM.exe /SOS" /A /ID 1bootcfg /RAW "/SOS" /A /ID 2goto End:MPAEbootcfg /copy /D "Load using default multiprocessor/HT PAE kernel" /ID 1bootcfg /RAW "/Kernel=KrnlMpa.exe /SOS" /A /ID 1bootcfg /RAW "/SOS" /A /ID 2:Endbootcfg /Timeout 15bootcfg /Default /ID 1 Edited October 20, 2008 by rajesh.kumar Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now