Page 1 of 1 1
Topic Options
#151213 - 2005-11-09 04:19 PM Changing a registry value with a IF Readvalue statement
rhamersley Offline
Fresh Scripter

Registered: 2005-11-09
Posts: 15
Loc: Fort Lauderdale, FL
What Im trying to do, is if the value '\\hoclewww01\oracle' exists in the registry name 'TNS_ADMIN' replace it with ''\\fladomain\dfsshares\oracle','REG_SZ'.

Here is my code in my kixtart script.

If ReadValue('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment','TNS_ADMIN','\\hoclewww01\oracle')
? "Found Value in HKCU..."
WriteValue('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment','TNS_ADMIN','\\fladomain\dfsshares\oracle','REG_SZ')
EndIf

I get an error...Does anyone know why Im recieving an error. Could use the help.

Top
#151214 - 2005-11-09 04:25 PM Re: Changing a registry value with a IF Readvalue statement
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
if ReadValue('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment','TNS_ADMIN') = '\\hoclewww01\oracle'
Top
#151215 - 2005-11-09 04:36 PM Re: Changing a registry value with a IF Readvalue statement
rhamersley Offline
Fresh Scripter

Registered: 2005-11-09
Posts: 15
Loc: Fort Lauderdale, FL
Bryce!!!!

I made the change and it worked. I appreciate the help. YOU THE MAN!!!!

Robert

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 1376 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.054 seconds in which 0.027 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