Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

will the xpe check disk after abnormal shutdown?

34 views
Skip to first unread message

zebing zhou

unread,
Mar 4, 2004, 12:36:34 AM3/4/04
to

KM

unread,
Mar 4, 2004, 4:06:36 AM3/4/04
to
zebing,

Try adding a multi-string reg.value "BootExecute"="autocheck autochk /i
\??\C:
autocheck autochk *" under
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager] key.
(change C: to the drive letter you are interested in)

KM


Doug Hoeffel

unread,
Mar 4, 2004, 9:40:39 AM3/4/04
to
As KM stated, by default XPe will not do this. Also, beware if you are
using EWF.

I created a custom component that sets the BootExecute registry value to:
autocheck autochk /k:C *

This is the same as running "chkntfs C: /X" from the cmd prompt. This runs
chkdsk if the dirty bit is set on all partitions except the boot C:
partition which is protected by the EWF.

I also set the timeout to 0 via:


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]

"AutoChkTimeOut"=dword:00000000

HTH... Doug
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell
Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"zebing zhou" <sz.z...@evoc.com.cn> wrote in message
news:uIKIrqaA...@TK2MSFTNGP12.phx.gbl...
>
>
>


zebing zhou

unread,
Mar 10, 2004, 2:09:20 AM3/10/04
to
thanks KM and Doug Hoeffel;
and how much does the built order if i only add reg?
when i build the image, it say the reg error?


"zebing zhou" <sz.z...@evoc.com.cn> 写入消息新闻
:uIKIrqaA...@TK2MSFTNGP12.phx.gbl...
>
>
>


Slobodan Brcin (eMVP)

unread,
Mar 10, 2004, 9:43:53 AM3/10/04
to
I don't think that I understand your question but here is some info I wrote
about modifying registry values.


Postponing registry changes to phase after PnP.

All registry values present in Target Designer during the Build Image phase
are stored in appropriate registry files.
These values can be overwritten during the FBA process by some PnP process
or some other component registration phases.
If you need to set some registry values that should stay changed after the
FBA is completed then you should:

Create full registry entry in following form
HKEY_LOCAL_MACHINE\System\FBA\RegMigrate\RootKey\....
All values found under RegMigrate key will be copied by component "COM
Server Registration" at the FBA time to specified destinations in registry.

RootKey value can have one of following values (HKLM, HKCR, HKCU) and it
represents the actual position in registry where values will be copied
during the FBA.
For more information about these values read Microsoft Windows Registry (<--
link here ----
http://support.microsoft.com/default.aspx?scid=kb;EN-US;256986)

Example:

Let say that our goal is to set
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\usbhub, Start,
REG_DWORD value to 0.

We have two possible ways to try to accomplish this:
Harder way would be to find component that sets this value and to modify
value accordingly to our wish.
After some time and luck you could find out that component that set this
value is "USB Root Hub".
Easier way If you don't want or you don't have time to search for this value
is that you can add value in "Extra Registry Data" with some higher build
order value set.
Both approaches will produce same values in registry files built by TD. And
at first sight it would appear that we have accomplished our goal, but let
us examine closer what will happen.

After deploying XPe image we run FBA. At the beginning of FBA process our
value in registry will be correct. During the FBA phase 3100 PnP will detect
new device and find inf file that support this new device.
Since this particular inf file have Start value set to 3. During the
installation of this driver, our value in registry will be changed back to
3. So, from this point on, our value is not value that matches our goal.
By doing this changes we have solved only first part of our goal.

For our second part we have two choices:
We can use "FBA generic command" with tools like reg.exe or regedit.exe to
make changes to registry at some phase we choose.
Command like "reg ADD HKLM\System\CurrentControlSet\Services\usbhub /v Start
/t REG_DWORD /d 0 /f" set to be executed at phase 8499 would do the trick.
This approach requires that we have at least one of mentioned tools present
in our image. Also entering values in this manner can be little tedious.

Second method would be more acceptable for importing larger quantities of
values.
You will need to change root entry to four byte code and to prefix whole
registry entry with "HKEY_LOCAL_MACHINE\System\FBA\RegMigrate\".
At the end our registry entry would look like
"HKEY_LOCAL_MACHINE\System\FBA\RegMigrate\HKLM\System\CurrentControlSet\Serv
ices\usbhub, Start, REG_DWORD, 0"
As already mentioned all values contained under
HKEY_LOCAL_MACHINE\System\FBA\RegMigrate will be copied during the phase
6000 to their destinations.

Analysis:
If we choose to use only one of the solutions in most cases we could get
working image, but there are always exceptions.
If we use first part solution to directly modify registry value from Target
Designer there is a very high chance that during the FBA some component or
PnP will modify our value.
Also If we are using second part of solution only, we won't have value set
during the first FBA boot. For most scenarios this is not a problem, but if
we need to mark this device to be used for purposes of booting the system,
then is could be a cause for BSOD.
You will need to consider carefully when to use first, second, or both
solutions together.

Demystifying HKEY_LOCAL_MACHINE\System\FBA\RegMigrate key:
Component "COM Server Registration" contains call to function
FBAReg.dll::FBAMigrateRegistryKeys at FBA phase 6000.
This function when called will copy all registry entries contained below
RegMigrate key to requested positions.

Regards,
Slobodan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell
Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"zebing zhou" <sz.z...@evoc.com.cn> wrote in message

news:OYVBh6mB...@TK2MSFTNGP11.phx.gbl...

KM

unread,
Mar 10, 2004, 2:02:47 PM3/10/04
to
zebing,

What exactly the "reg error" TD threw ?
How did you add the registry data to your Configuration (there is few ways
to do that)?

--
KM,
BSquare Corporation

PS. Sometimes it may help if you include more information up-front along
with your question(s). It will help the folks here to get more accurate
picture of the problems you are trying to fix on your side.

0 new messages