#72166 - 2002-12-09 10:06 AM
Script for registry
|
kalev
Fresh Scripter
Registered: 2002-12-05
Posts: 21
|
Hello!
Could you tell me why does my script give me the opposite answers? If key exists, it tells me "Key does not exist" and if it does, it tells me "Key exists.."
if ExistKey ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP2\Q282522") ? "Key exists...." else ? "Key does not exist" Endif
Also - what command should i use to check the value of a Registry subkey?
|
|
Top
|
|
|
|
#72172 - 2002-12-09 10:30 AM
Re: Script for registry
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
|
|
Top
|
|
|
|
#72175 - 2002-12-09 11:09 AM
Re: Script for registry
|
kalev
Fresh Scripter
Registered: 2002-12-05
Posts: 21
|
So.. Without using "$Returncode" i cant make it be logical? just have to use it the opposite way? Like that? Or is there a way?
if Existkey ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP2\Q282522") ? "Key does not exist" else ? "Key exists..." Endif
|
|
Top
|
|
|
|
#72176 - 2002-12-09 11:17 AM
Re: Script for registry
|
kalev
Fresh Scripter
Registered: 2002-12-05
Posts: 21
|
I got it.. I should not use ExistKey, but KeyExist it works fine now
|
|
Top
|
|
|
|
#72179 - 2002-12-09 11:31 AM
Re: Script for registry
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
#72181 - 2002-12-09 11:40 AM
Re: Script for registry
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1003 anonymous users online.
|
|
|