suppressing system message to restart system

A

artrab

I have an XPe system which is using FBWF. This camera DVR system is normally
shutdown by simply turning off the power switch.

The system uses a SATA drive in an interchangeable carrier - video data is
written to this unprotected volume (D:) The compact flash (C:) contains the
OS and is write protected.

We have a DVR application which writes to the SATA drive. When we do a
normal hard shutdown after recording to the SATA and do a reboot, we
frequently get a system dialog saying basically that Windows needs to
restart to finish installing a device. We think that the device referred to
is the interchangeable SATA drive in the carrier. We have had no problem
writing to the SATA drive and would simply like to suppress this system
message.

I have ErrorMode in the registry set to 2 but I still get this system
dialog. Two questions: 1) Does anyone know why I'm getting the dialog message
and 2) how can I suppress it without temporarily having to disable FBWF.

Thanks,

Art
 
S

Sean Liming \(MVP\)

If you are switching out SATA drives, the OS is detecting the change and
updating the registry.

Try adding Message Box Default Reply. This will surpress message boxes, and
post the information to the log file.

Regards,

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

artrab

The default button in that restart system message is "Yes" - we would like
"No", i.e. we don't want to restart.


Does the Message Box Default Reply component operate such that the message
box doesn't come up AND effectively neither the "Yes" or "No" is selected

OR

is it the Message Box doesn't come up and the default "Yes" button is
selected which would trigger a reboot we don't want?



Also, can I take care of this without a rebuild, eg. use the Error Message
Instrument key?

Thanks,

Art
 
S

Sean Liming \(MVP\)

The message box doesn't show up, and the default for the box is selected. I
believe MBDR has to be built into the image, but you can take a look at the
component's resources to see how it can be added post-FBA.


Regards,

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

Mike Warren

Sean said:
I believe MBDR has to be built into the image, but you can
take a look at the component's resources to see how it can be added
post-FBA.


This works for me: (Delphi code, but you should get the idea)

procedure SetMessageBoxDefResponse(DoSet: Boolean);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.LazyWrite := False;
Reg.RootKey := HKEY_LOCAL_MACHINE;
if DoSet then
begin
Reg.OpenKey('SYSTEM\ControlSet001\Control\Error Message
Instrument', True);
Reg.WriteBool('EnableDefaultReply', True);
Reg.WriteBool('EnableLogging', True);
Reg.WriteInteger('LogSeverity', 0);
Reg.CloseKey;

Reg.OpenKey('SYSTEM\ControlSet001\Services\EventLog\Application\Error
Instrument', True);
Reg.WriteString('EventMessageFile',
'%SystemRoot%\System32\User32.dll');
Reg.WriteInteger('TypesSupported', 7);
Reg.CloseKey;
end else begin
Reg.DeleteKey('SYSTEM\ControlSet001\Control\Error Message
Instrument');

Reg.DeleteKey('SYSTEM\ControlSet001\Services\EventLog\Application\Error
Instrument');
end;
finally
Reg.Free;
end;
end;
 

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