Restoring Registry Problem

G

Guest

Hi,
I am trying to restore the registry after a cold boot to avoid having to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 
C

Chris Tacke, eMVP

What makes you think that the device supports persisting the registry
through a cold boot? Is there documentation for the device that says that
it does? I've not seen a PPC yet that has that feature.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 
G

Guest

Hi,
Thank you for your reply. I am not sure that persisting the registry is
supported on the XDA 2 but I can not see another way round of solving the
problem of avoiding the screen alignment, dentist appointment cut and paste
and the region settings. I understand that the welcome.exe is run when the
device is cold booted which takes you throught the above process and for this
not to occur a possible OS change would need to be made, as replacing the
welcome.exe before a cold boot, then cold booting reverts the welcome.exe
back to default. As access to the OS is not possible there must be a work
around that can solve this probably common problem.
Thank you in advance for any information regarding this problem
Paul

Chris Tacke said:
What makes you think that the device supports persisting the registry
through a cold boot? Is there documentation for the device that says that
it does? I've not seen a PPC yet that has that feature.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


pauldiston said:
Hi,
I am trying to restore the registry after a cold boot to avoid having to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 
P

Paul G. Tobey [eMVP]

Well, RegFlushKey() isn't going to do anything for you, in this situation.
You might be able to use RegCopyFile() to copy the registry content to a
file in persistent store. On cold reboot, you could then, if your device
provides the means, launch a program that does a RegRestoreFile() to restore
the registry and then do a warm reboot. However, no, if there's no way to
persist the RAM-based registry and *use* that persisted registry 'file' on a
cold boot built into the OS, you can't do it.

Paul T.

pauldiston said:
Hi,
Thank you for your reply. I am not sure that persisting the registry is
supported on the XDA 2 but I can not see another way round of solving the
problem of avoiding the screen alignment, dentist appointment cut and
paste
and the region settings. I understand that the welcome.exe is run when the
device is cold booted which takes you throught the above process and for
this
not to occur a possible OS change would need to be made, as replacing the
welcome.exe before a cold boot, then cold booting reverts the welcome.exe
back to default. As access to the OS is not possible there must be a work
around that can solve this probably common problem.
Thank you in advance for any information regarding this problem
Paul

Chris Tacke said:
What makes you think that the device supports persisting the registry
through a cold boot? Is there documentation for the device that says
that
it does? I've not seen a PPC yet that has that feature.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


pauldiston said:
Hi,
I am trying to restore the registry after a cold boot to avoid having
to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does
not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot
the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As
this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 
G

Guest

Thank you for your reply.
I have used the RegCopyFile and RegRestoreFile and they extract a registry
file and restore it successfully, (I am not sure if this registry is
RAM-based. The trouble is the screen alignment, cut and paste demo and region
settings appear before a app can be run, even running from the extended rom.
If you have any suggestions regarding disabling the screen alignment, cut
and paste demo and region settings I would be very grateful.
Thank you in advance for your help.
Paul

Chris Tacke said:
What makes you think that the device supports persisting the registry
through a cold boot? Is there documentation for the device that says that
it does? I've not seen a PPC yet that has that feature.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


pauldiston said:
Hi,
I am trying to restore the registry after a cold boot to avoid having to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 
P

Paul G. Tobey [eMVP]

Those things are configured in the registry, so no, if the device
manufacturer didn't allow for this scenario, you can't do it, as Chris and I
both said. You could, potentially, contact the device manufacturer and, if
you are a big customer of their devices, you might be able to get some
secret information that would help, but I'd be surprised if there was a way
to do that.

Paul T.

pauldiston said:
Thank you for your reply.
I have used the RegCopyFile and RegRestoreFile and they extract a registry
file and restore it successfully, (I am not sure if this registry is
RAM-based. The trouble is the screen alignment, cut and paste demo and
region
settings appear before a app can be run, even running from the extended
rom.
If you have any suggestions regarding disabling the screen alignment, cut
and paste demo and region settings I would be very grateful.
Thank you in advance for your help.
Paul

Chris Tacke said:
What makes you think that the device supports persisting the registry
through a cold boot? Is there documentation for the device that says
that
it does? I've not seen a PPC yet that has that feature.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


pauldiston said:
Hi,
I am trying to restore the registry after a cold boot to avoid having
to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does
not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot
the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As
this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 
P

Paul G. Tobey [eMVP]

The Welcome.not file thing will work, but you'd have to have some way to
launch your code before the calibration program in order to bypass that and
I don't see any way to do that unless you can modify the registry before
that item runs, which seems unlikely, or unless the OEM has build a way
around it.

Paul T.

Darren Beckley said:
This article might help with getting around screen calibration and welcome
screens

http://blog.opennetcf.org/pfoot/PermaLink,guid,06b4072d-3585-43d4-8605-f7cebc6387f7.aspx

Hope that helps,
Darren


pauldiston said:
Hi,
I am trying to restore the registry after a cold boot to avoid having to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As
this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 
G

Guest

Hi,
Thank you for your reply. The Welcome.Not file being present in the
Storage Card root does work but does not work when the file is in the Storage
directory. Also when the handheld is at the welcome screen without the
storage card installed the welcome screen does not disappear, but as soon as
I put the storage card in the slot the welcome screen disappears and the cab
files are installed. I am wondering if there is a work around for this as
having to have a storage card for each device we install our software on will
increase costs and in some devices the SDIO slot is used for a barcode
scanner. I would be grateful for your help.
Thank you in advance for your help.
Paul

Darren Beckley said:
This article might help with getting around screen calibration and welcome
screens

http://blog.opennetcf.org/pfoot/PermaLink,guid,06b4072d-3585-43d4-8605-f7cebc6387f7.aspx

Hope that helps,
Darren


pauldiston said:
Hi,
I am trying to restore the registry after a cold boot to avoid having to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 
P

Paul G. Tobey [eMVP]

No, I'm sure that's just the way it works.

Paul T.

pauldiston said:
Hi,
Thank you for your reply. The Welcome.Not file being present in the
Storage Card root does work but does not work when the file is in the
Storage
directory. Also when the handheld is at the welcome screen without the
storage card installed the welcome screen does not disappear, but as soon
as
I put the storage card in the slot the welcome screen disappears and the
cab
files are installed. I am wondering if there is a work around for this as
having to have a storage card for each device we install our software on
will
increase costs and in some devices the SDIO slot is used for a barcode
scanner. I would be grateful for your help.
Thank you in advance for your help.
Paul

Darren Beckley said:
This article might help with getting around screen calibration and
welcome
screens

http://blog.opennetcf.org/pfoot/PermaLink,guid,06b4072d-3585-43d4-8605-f7cebc6387f7.aspx

Hope that helps,
Darren


pauldiston said:
Hi,
I am trying to restore the registry after a cold boot to avoid having
to
align the screen, set the region etc, and having searched this site and
google groups, I am trying to use the RegFlushKey API call. This does
not
seem to work on an XDA 2 running Pocket PC 2003, as after a cold boot
the
screen alignment and set region screens still appear.
Also should a file be created when I call the RegFlushKey method ? As
this
is not happening.
Thank you in advance for any information regarding this problem.
Here is an example of the API call and code that I am trying to use :

[DllImport("coredll.dll", EntryPoint="RegFlushKey", SetLastError=true)]
private static extern uint RegFlushKey(uint hKey);

public static void FlushRegKey(uint hKey)
{
try
{
long test = RegFlushKey(0x80000002);
}
catch (Exception ex)
{
string mess = ex.Message;
}
}
 

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