Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read file from regedit

Status
Not open for further replies.

hlyeoh

MIS
May 31, 2004
22
MY
Hi all,

QUESTION : how to read a file from regedit, without info where the specific path the file is stored? The file type is REZ_SZ and i need to read the content of the file.

Thank you.
Please provide me some useful link that i can try to check on it if you have. thanks.

 
Hello hlyeoh,

Same advice I've given a couple of thread ago. Can be slightly more concrete here in two steps involving different type of objects.

[1] Instantiate a wscript.shell WshShell object. Use .regread method to read the value from the registry where the file spec is stored in REG_SZ format.
[2] From the filespec, instantiate a scripting.filesystemobject fso. Use getfile method to get to the file. Or, if the file is a text file, use Opentextfile method to open it directly.

regards - tsuji
 
thanx tsuji for the reply.
there is one problem that i face now which is reading parameter.I need to pass parameter, but somehow when i try to pass "=", it will not be able to read it. How should i read it?

here is an example of things that i need to read :

param1 = "-- "
param2 = "-set BSE_COMPNR"
param3 = """" & "=" & """"
param4 = comp_code & " "
param5 = "tdpuro173m000"

the output that i read from the command prompt is
-- -set BSE_COMPNR "=" 100 tdpuro173m000

there is " " appear in the number 100 which i don't want.The output i want is
-- -set BSE_COMPNR =100 tdpuro173m000

if i change to param3 = "=" , it wouldn't appear =

 
Could you post the actual code?

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
hlyeoh,

What kind of object are these paramters passed to?

Definitely no need to """" thing. But
param3=chr(61)
probably does not help neither. Also you may try
param3=escape("=")

- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top