Page 1 of 1 1
Topic Options
#171817 - 2006-12-20 04:57 PM Adding Registry Key/Value Problem.
Kirk Offline
Lurker

Registered: 2006-09-13
Posts: 4
I am trying to add a registry value via a KIX script. I can add the key without an issue. However when creating a Registry key you always get a "(Default)" value for that key. I need to modified that value so when I create the Key it can add this to it's "(Default)" value "IDMViewerApp.Document". Here is adding my key string

AddKey( ""HKEY_CURRENT_USER\Software\Classes\.tif" )

Once this key is created you have that "(Default)" value which is a REG_SZ how do I add the statement in there for IDMViewerApp.Document?

I have tried doing A Writevalue but that just adds another separate value which will not work.

Any suggestions? I really need help on this...

Top
#171819 - 2006-12-20 05:54 PM Re: Adding Registry Key/Value Problem. [Re: Kirk]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Your AddKey() has mismatched quotes.
THe manual explains the default value.


Edited by Les (2006-12-20 05:56 PM)
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#171823 - 2006-12-20 07:04 PM Re: Adding Registry Key/Value Problem. [Re: Les]
Kirk Offline
Lurker

Registered: 2006-09-13
Posts: 4
That was a mistype. I just started typing then did a copy. So the quotes don't exist in the script. Where is the default value in the manaul? I read page page 53 but that does not give me any clues. Sorry if I am just missing something simple.
Top
#171826 - 2006-12-20 07:23 PM Re: Adding Registry Key/Value Problem. [Re: Kirk]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
On page 113 for WRITEVALUE

Quote:
Subkey
Identifies the subkey where you want to write a value entry.
Entry
The name of the entry. To write to the default entry of a key, specify an empty string as the entry name ("").


I also think you have the WRONG key listed. Here is what I think the code should be.

Code:
Break On
Dim $RC
$RC=WriteValue('HKCR\.tif','','IDMViewerApp.Document',REG_SZ)
'Reg update returned: ' + @ERROR + ' - ' + @SERROR ?


.

Top
#171840 - 2006-12-20 10:19 PM Re: Adding Registry Key/Value Problem. [Re: NTDOC]
Kirk Offline
Lurker

Registered: 2006-09-13
Posts: 4
That worked. Thank you so much.
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 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 1.54 seconds in which 0.281 seconds were spent on a total of 13 queries. Zlib compression enabled.

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