Page 1 of 1 1
Topic Options
#62404 - 2002-01-25 09:12 PM Reading a "(default)" reg value.
AndyH Offline
Lurker

Registered: 2002-01-25
Posts: 2
Loc: Los Angeles, CA
I am trying to get a version number for Win 98 DCOM by reading a default registry value, but I am having trouble with the default name part. I'm not sure how that is supposed to be formatted.
;*** first install dcomxx *****************************************************
;*** it will ask to reboot ****************************************************

code:
  
$dcom = READVALUE("HKEY_CLASSES_ROOT\CLSID\{bdc67890-4fc0-11d0-a805-00aa006d2ea4}\InstalledVersion","(default)")
IF $dcom = "4,71,0,3328"
Color g+/n
? "Key exists, Value is: " + $dcom
; Do nothing
ELSE
? "Key not found, Error value is: " + $dcom
AT (16,25) "Your computer needs to reboot."
AT (16,25) "Choose 'yes' and 'yes' to restart."
SHELL "\\usingapp02\nscap\Bin\Win32\X86\redist\dcom\dcom98.exe /Q"
Sleep 3 ; so I can read the results
ENDIF


Top
#62405 - 2002-01-25 09:21 PM Re: Reading a "(default)" reg value.
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Hi Andy,

Welcome to the board!

Have you read the manual? you can download the users manual and a CHM version here: http://kixtart.org/downloads.html

This is the explanation of READVALUE():

ReadValue( )

Action
Reads the value of a registry entry.

Syntax
READVALUE ("subkey", "entry")

Parameters
Subkey : Identifies the subkey containing the entry.

Entry : Identifies the entry whose value you want to discover. To read the default entry of a key, specify an empty string as the entry name.

Returns
0 Function returns ASCII representation of the specified registry entry
Error code Function failed

_________________________
The Code is out there

Top
#62406 - 2002-01-25 09:38 PM Re: Reading a "(default)" reg value.
AndyH Offline
Lurker

Registered: 2002-01-25
Posts: 2
Loc: Los Angeles, CA
Ahh. I had tried that earlier but I thought "empty value" meant:

readvalue(" ")
With a space between the quotes. That did'nt work of course.

But it does now! Thank you!

Top
#62407 - 2002-01-27 06:07 AM Re: Reading a "(default)" reg value.
MCA Offline
KiX Supporter
*****

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

An empty value is not something like " ", but something like "".
greetings.

_________________________
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:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 641 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

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

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org