Page 1 of 1 1
Topic Options
#12753 - 2001-10-03 01:03 PM LoadKey / WriteValue issue
Anonymous
Unregistered


Long time no post.
Have an issue where I need to write to the registry on a WinNT machine. I have the following code to create the key:
$ReturnCode = AddKey("HKEY_CURRENT_USER\software\policies\Microsoft\office\9.0\outlook\webview")
This works fine and the key is created.

Writing the value to the key poses more of a problem. I have tried the following:
LoadKey("HKEY_CURRENT_USER\software\policies\Microsoft\office\9.0\outlook\webview", "c:\temp\intranet.reg")
AND
WriteValue("HKEY_CURRENT_USER\software\policies\Microsoft\office\9.0\outlook\webview",
"URL", "X:\Path\folder\file.html" "REG_SZ")But both of these bomb out.

I cannot see where they are going wrong.

Any ideas???

Thanks

Top
#12754 - 2001-10-03 03:28 PM Re: LoadKey / WriteValue issue
Anonymous
Unregistered


Hi.

If I'm not mistaking, SAVEKEY and LOADKEY both uses "binary" reg-files. I.E. not the kind produced by regedit's export.

Second.
Your WriteValue lacks a comma just before "REG_SZ"
The function also fails if the key HKEY_CURRENT_USER\software\policies\Microsoft\office\9.0\outlook doesn't exist

Hope it helps...

-Patrick

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 581 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.048 seconds in which 0.024 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