From: Boris on
Hi,

I'm thinking about writing custom Native EXE that will be executed early
during Windows boot process. I'll put pathname of my Native EXE into
BootExecute value in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager key. But
I need to tell "cold" boot from "warm" boot: if hardware was powered on or
just Windows restarted.
Is there a way of doing this?

Thanks,
Boris

From: Boris on
The operating systems in question are: XP SP3 (or XP Embedded Standard),
Win7 (or Win 7 Embedded).

Thanks,
Boris

"Boris" <somewhere(a)nowhere.net> wrote in message
news:4c38f6cf$0$22105$742ec2ed(a)news.sonic.net...
> Hi,
>
> I'm thinking about writing custom Native EXE that will be executed early
> during Windows boot process. I'll put pathname of my Native EXE into
> BootExecute value in
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager key.
> But I need to tell "cold" boot from "warm" boot: if hardware was powered
> on or just Windows restarted.
> Is there a way of doing this?
>
> Thanks,
> Boris

From: a on
"Boris" <somewhere(a)nowhere.net> wrote in message news:4c38f980$0$22093$742ec2ed(a)news.sonic.net...
> The operating systems in question are: XP SP3 (or XP Embedded Standard), Win7 (or Win 7 Embedded).
>
> Thanks,
> Boris
>
> "Boris" <somewhere(a)nowhere.net> wrote in message news:4c38f6cf$0$22105$742ec2ed(a)news.sonic.net...
>> Hi,
>>
>> I'm thinking about writing custom Native EXE that will be executed early during Windows boot process. I'll put pathname of my
>> Native EXE into BootExecute value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager key. But I need to tell
>> "cold" boot from "warm" boot: if hardware was powered on or just Windows restarted.
>> Is there a way of doing this?

I was going to say just check the value of GetTickCount(), but that's no
good if the user has rebooted the PC. Maybe check that once, and store a
flag value somewhere (with the date) so that subsequent checks on the same
day know that the PC has already been previously started that day? That
should work fine.


From: Boris on


"a" <b(a)invalid.com> wrote in message news:4c39fc6b$1(a)dnews.tpgi.com.au...
> "Boris" <somewhere(a)nowhere.net> wrote in message
> news:4c38f980$0$22093$742ec2ed(a)news.sonic.net...
>> The operating systems in question are: XP SP3 (or XP Embedded Standard),
>> Win7 (or Win 7 Embedded).
>>
>> Thanks,
>> Boris
>>
>> "Boris" <somewhere(a)nowhere.net> wrote in message
>> news:4c38f6cf$0$22105$742ec2ed(a)news.sonic.net...
>>> Hi,
>>>
>>> I'm thinking about writing custom Native EXE that will be executed early
>>> during Windows boot process. I'll put pathname of my Native EXE into
>>> BootExecute value in
>>> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager key.
>>> But I need to tell "cold" boot from "warm" boot: if hardware was powered
>>> on or just Windows restarted.
>>> Is there a way of doing this?
>
> I was going to say just check the value of GetTickCount(), but that's no
> good if the user has rebooted the PC. Maybe check that once, and store a
> flag value somewhere (with the date) so that subsequent checks on the same
> day know that the PC has already been previously started that day? That
> should work fine.
Thanks for the response - but I don't think so. GetTickCount() counter is
reset to 0 each time OS boots - you cannot tell cold boot from warm boot
that way. It's possible, some HAL lib functions can extract that info from
system BIOS - but I couldn't find anything relevant.

Boris

From: Bob Masta on
On Sat, 10 Jul 2010 15:40:34 -0700, "Boris"
<somewhere(a)nowhere.net> wrote:

>Hi,
>
>I'm thinking about writing custom Native EXE that will be executed early
>during Windows boot process. I'll put pathname of my Native EXE into
>BootExecute value in
>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager key. But
>I need to tell "cold" boot from "warm" boot: if hardware was powered on or
>just Windows restarted.
>Is there a way of doing this?

Maybe no longer relevant, but:

Back in the Good Old Days of DOS, the BIOS set the word at
0x0472 to 0x1234 after the initial power-up memory test. If
you did a warm boot via CTRL-ALT-DEL and the memory test
code found this word already set to 0x1234, it skipped the
memory test (which used to be rather lengthy on some of
those old machines). You could force a "cold boot" memory
test by setting this word to some other value.

I don't know if the BIOS still does anything with this word,
or even if there is still a memory test (other than sizing).
But it might be something to look into if nothing else
turns up.

Best regards,


Bob Masta

DAQARTA v5.10
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
Frequency Counter, FREE Signal Generator
Pitch Track, Pitch-to-MIDI
DaqMusic - FREE MUSIC, Forever!
(Some assembly required)
Science (and fun!) with your sound card!