Pre Windows 2008 (Windows 2003 and Windows 2000) - I Used custom switches in boot.ini to control some code from execution/exclusion in my driver. I read these switches from SystemStartOptions registry value from HKLM\System\CurrentControlSet\Control registry key.
In Windows 2008 BCD took over boot.ini - It is documented how to add custom BCD elements to windows boot loader entry. Using BCDedit i could add custom BCD elements to boot loader entry, but could not find any thing specific about how to access these from my driver. I could not find custom attributes in SystemStartOptions registry value, though other standard options are present in that. Any help in providing information or pointers to documention/API, that would allow me to do this is appreciated.
I am hoping as Windows kernel itself has information about the BCD elements that are set, there is a documented or a work around to get this informaiton.
TIA
Sai
SystemStartOptions are here in 2008, with debugging options and
NoIntegrityChecks.
I don’t know, though, how to add your own option there.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> Pre Windows 2008 (Windows 2003 and Windows 2000) - I Used custom switches in
boot.ini to control some code from execution/exclusion in my driver. I read
these switches from SystemStartOptions registry value from
HKLM\System\CurrentControlSet\Control registry key.
>
> In Windows 2008 BCD took over boot.ini - It is documented how to add custom
BCD elements to windows boot loader entry. Using BCDedit i could add custom BCD
elements to boot loader entry, but could not find any thing specific about how
to access these from my driver. I could not find custom attributes in
SystemStartOptions registry value, though other standard options are present in
that. Any help in providing information or pointers to documention/API, that
would allow me to do this is appreciated.
>
> I am hoping as Windows kernel itself has information about the BCD elements
that are set, there is a documented or a work around to get this informaiton.
>
> TIA
> Sai
>
> SystemStartOptions are here in 2008, with debugging options and
NoIntegrityChecks.
I don’t know, though, how to add your own option there.
This might do what the OP wanted:
bcdedit /set LOADOPTIONS “name=value”
Does the “name=value” appear in SystemStartOptions? That is really what is
being asked I think.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
wrote in message news:xxxxx@ntdev…
>> SystemStartOptions are here in 2008, with debugging options and
>> NoIntegrityChecks.
>>
>> I don’t know, though, how to add your own option there.
>
> This might do what the OP wanted:
>
> bcdedit /set LOADOPTIONS “name=value”
>
>
It does do this. I just tried, and I have to say that given essentially
everything else about ‘bcdedit,’ I was betting against this.
If I recall correctly, the BCD information appears in a parsed form
somewhere in the registry as well, but I could remembering incorrectly.
I think it also may be accessible from WMI, but I could be making that
up as well.
Good luck,
mm
Don Burn wrote:
Does the “name=value” appear in SystemStartOptions? That is really what is
being asked I think.
> Does the “name=value” appear in SystemStartOptions? That is really
what is being asked I think.
To avoid looking too foolish here I did actually try this myself before suggesting it. (This wasn’t Vista RTM, so if it doesn’t work there then maybe I am foolish…)
C:\>bcdedit /set LOADOPTIONS “VERIFIED?=YES!”
C:\>shutdown -r -t 0
result:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
“SystemStartOptions”=" NOEXECUTE=OPTIN DEBUG DEBUGPORT=COM1 BAUDRATE=115200 VERIFIED?=YES! NOGUIBOOT BOOTLOGO"
Glen thanks for your response. This is exactly what i needed.
For completness i am adding some more info for readers
bcdedit /set LOADOPTION “/PARAM=VALUE”
command fails. But if you add a space before “/PARAM= VALUE, i.e " /PARAM=VALUE” it works. Can’t explain but that works :). So LOADOPTION can not start with “/”.