You can get the data, but it is painful. For the pathname it will either be
ntoskrnl.exe or ntkrnlpa.exe in the windows directory. You can determine
which, by checking the registry setting
HKLM\System\CurrentControlSet\Control\SystemStartOptions which gives you the
boot.ini options (it is supposed to work in later OS’es but I have not
verified this). Once you know which file, you can use GetFileVersionInfo
and related API’s to read the version block from the file and get the
original file name.
I did this for a tool that would add the partial checked build to a
configuration for you without following what was then Microsoft’s painful 12
step notes. Unfortunately, I never released the tool because Vista came out
and it only works for earlier versions, and in dealing with Vista, I found
that Microsoft made it too hard to contemplate.
–
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“Petr Kurtin” wrote in message news:xxxxx@ntdev…
yes, you’re right
but it will work on relatively most systems - I don’t know about better
detection…
Petr
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Skywing
Sent: 23. kvìtna 2009 19:41
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] about instances of ntoskrnl.exe
This is not guaranteed to work; a custom kernel filename could be in use,
specified by /kernel=.
- S
_____
From: Petr Kurtin
Sent: Saturday, May 23, 2009 08:33
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] about instances of ntoskrnl.exe
Hello Jack,
This can be determined by NT load image name and OS version number.
ZwQuerySystemInformation/SystemModuleInformation returns the list of loaded
kernel modules. Now you must look known NT kernel names up in that list.
Usually, it’s placed at the first position, but don’t rely on that.
5.x OSes use 4 different kernels:
ntoskrnl.exe (1 CPU)
ntkrnlmp.exe (N CPU, SMP)
ntkrnlpa.exe (1 CPU, PAE)
ntkrpamp.exe (N CPU, SMP, PAE)
For 6.x x86 OSes, single processor kernel is gone, so just PAE and non-PAE
remains. Multi-processor kernels were just renamed to ntoskrnl.exe and
ntkrnlmp.exe. XP/Vista 64-bit OSes use only one kernel: ntoskrnl.exe.
Petr
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jack sa
Sent: 23. kvìtna 2009 14:26
To: Windows System Software Devs Interest List
Subject: [ntdev] about instances of ntoskrnl.exe
Dear friends
Is there any way to understand which instance of ntoskrnl.exe (ntoskrnl,
ntkrnlpa,ntkrnlmp,ntkrnlamp) is running in the typical system? I want to
know is there any API or registry entry to find the CPU information
(simgle/multiple processor - with PAE / without PAE ) with a program ?
Cheers
Jack
— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4098 (20090522)
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com