Page 1 of 1 1
Topic Options
#177671 - 2007-07-09 11:46 PM Registry Change
SNDMN3571 Offline
Lurker

Registered: 2007-07-09
Posts: 2
Hello all, I'm new to KIXTART and scripting so please go easy on me. I am using the latest version but don't think all is going well. All of my script works with the exception of the following:




If KEYEXIST=("HKEY_CURRENT_USER\SOFTWARE\RealVNC\winvnc4")

WriteValue("HKEY_CURRENT_USER\SOFTWARE\RealVNC\winvnc4 QueryConnect = REG_DWORD 0x00000001")
WriteValue("HKEY_CURRENT_USER\SOFTWARE\RealVNC\winvnc4 HTTPPortNumber = REG_DWORD 0x00000000")
WriteValue("HKEY_CURRENT_USER\SOFTWARE\RealVNC\winvnc4 Hosts = Reg_SZ +10.1.0.0/255.255.0.0")
WriteValue("HKEY_CURRENT_USER\SOFTWARE\RealVNC\winvnc4 DisableOptions = REG_DWORD 0x00000001")
WriteValue("HKEY_CURRENT_USER\SOFTWARE\RealVNC\winvnc4 RemovePattern = REG_DWORD 0x00000001")
WriteValue("HKEY_CURRENT_USER\SOFTWARE\RealVNC\winvnc4 DisableEffects = REG_DWORD 0x00000001")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4 QueryConnect = REG_DWORD 0x00000001")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4 HTTPPortNumber = REG_DWORD 0x00000000")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4 Hosts = Reg_SZ +10.1.0.0/255.255.0.0")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4 DisableOptions = REG_DWORD 0x00000001")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4 RemovePattern = REG_DWORD 0x00000001")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4 DisableEffects = REG_DWORD 0x00000001")
ENDIF

I have verified that the key does exist but the values listed do not change and the script returns an error I can't see because it runs so fast.
Does anyone have any idea what I did wrong? Thanks in advance. If I have posted this in the wrong place please direct me further.

Top
#177672 - 2007-07-10 12:28 AM Re: Registry Change [Re: SNDMN3571]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
On page 113 of the kix2010.doc of the kix2010_453.zip package, you can read that the syntax for WriteValue() is
 Quote:

WRITEVALUE ("subkey", "entry", "expression", "data type")

So per example the last WriteValue() should be
 Code:
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4", "DisableEffects", "0x00000001",  "REG_DWORD")

Put something like
 Code:
Get $

at the end of your code to keep your window open

Top
#177673 - 2007-07-10 12:47 AM Re: Registry Change [Re: SNDMN3571]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
 Originally Posted By: SNDMN3571
If I have posted this in the wrong place please direct me further.
We don't generally consider the use of a basic function like WriteValue() to be an *Advanced Scripting* topic and we encourage new users to use the *Basic Scripting* forum.
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=1&page=1
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#177676 - 2007-07-10 07:22 AM Re: Registry Change [Re: Les]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
moved the thread.
_________________________
!

download KiXnet

Top
#177677 - 2007-07-10 08:23 AM Re: Registry Change [Re: Witto]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
 Originally Posted By: Witto
On page 113 of the kix2010.doc of the kix2010_453.zip package, you can read that the syntax for WriteValue() is
 Quote:

WRITEVALUE ("subkey", "entry", "expression", "data type")

So per example the last WriteValue() should be
 Code:
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\winvnc4", "DisableEffects", "0x00000001",  "REG_DWORD")

Put something like
 Code:
Get $

at the end of your code to keep your window open


You probably ment:
 Code:
WriteValue("HKLM\SOFTWARE\RealVNC\winvnc4","DisableEffects","1","REG_DWORD")

Top
#177687 - 2007-07-10 03:16 PM Re: Registry Change [Re: Arend_]
SNDMN3571 Offline
Lurker

Registered: 2007-07-09
Posts: 2
Thanks for your advice.
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
0 registered and 871 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.052 seconds in which 0.023 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