Page 1 of 1 1
Topic Options
#77624 - 2001-04-18 07:15 AM KIX2001-MAJOR: registry keys in HKCC (= hardware info) are not readable.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear Ruud,

Our problem is that the actual hardware configuration information
is stored in the HKCC hive. Still this information can not be read.
Our test code was:

code:

IF (@inwin = 1)
$NT_mode="yes"
ELSE
$NT_mode="no"
ENDIF

$ikey="HKEY_CURRENT_CONFIG\System\CurrentControlSet\Services"
;
; - \???\DefaultSettings.XResolution
; - \???\DefaultSettings.YResolution
;
$resolution=""
IF (existkey($ikey) = 0) AND ($NT_mode = "yes")
$completed="no"
$first=""
$x=""
$index=0
DO
$icode=ENUMKEY($ikey, $index)
IF (@error = 0)
? $ikey+"\"+$icode
IF (len($ikey+"\"+$icode+"\Device0") <> 0)
$x=$x+$first+"["+$icode+"=("
$x=$x+"X='"+ReadValue($ikey+"\"+$icode+"\Device0", "DefaultSettings.XResolution")+"',"
$x=$x+"Y='"+ReadValue($ikey+"\"+$icode+"\Device0", "DefaultSettings.YResolution")+"'"
$first=")],"
ENDIF
ELSE
$completed="yes"
ENDIF
$index=$index+1
UNTIL ($completed = "yes")
IF ($first <> "")
$x=$x+")]"
ENDIF
IF (len($x) <> 0)
$resolution=$x
ELSE
$resolution="<unknown resolution>"
ENDIF
ENDIF
?
? "NT resolution="+$resolution



The output of this example will be:
code:

NT resolution=<unknown resolution>


After changing

code:

$ikey="HKEY_CURRENT_CONFIG\System\CurrentControlSet\Services"
to
$ikey="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services"


the output will be:
code:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\mga_mil

NT resolution=[mga_mil=(X='800',Y='600')]


We understand that this hive should be read-only for any kixtart user.
Greetings.

BTW:
our information of the registry is:

code:

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\mga_mil]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\mga_mil\Device0]
"DefaultSettings.BitsPerPel"=dword:00000010
"DefaultSettings.XResolution"=dword:00000320
"DefaultSettings.YResolution"=dword:00000258
"DefaultSettings.VRefresh"=dword:0000003c
"DefaultSettings.Flags"=dword:00000000
"DefaultSettings.XPanning"=dword:00000000
"DefaultSettings.YPanning"=dword:00000000



code:

REGEDIT4

[HKEY_CURRENT_CONFIG\System\CurrentControlSet\Services]

[HKEY_CURRENT_CONFIG\System\CurrentControlSet\Services\mga_mil]

[HKEY_CURRENT_CONFIG\System\CurrentControlSet\Services\mga_mil\Device0]
"DefaultSettings.BitsPerPel"=dword:00000010
"DefaultSettings.XResolution"=dword:00000320
"DefaultSettings.YResolution"=dword:00000258
"DefaultSettings.VRefresh"=dword:0000003c
"DefaultSettings.Flags"=dword:00000000
"DefaultSettings.XPanning"=dword:00000000
"DefaultSettings.YPanning"=dword:00000000



_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#77625 - 2001-07-01 05:59 PM Re: KIX2001-MAJOR: registry keys in HKCC (= hardware info) are not readable.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

The read the information from your HKCC hive works great
for kixtart 4.00 RC1 release.
Also the shortnames for your hives works great.

Important to know: HKCC isn't read-only, but you have also write-access
to these keys.

Greetings.

BTW: new topic about write-access by HKCC hive created. this topic can be closed.

------------------
Site map:

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 823 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.048 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.