Page 1 of 1 1
Topic Options
#213619 - 2018-11-20 12:34 PM Error control returns abnormal value
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Helo,

In order to test the presence of an application on a workstation, I use the readvalue command.
The problem is that the error returns an abnormal value equel to "2", eventhough the registry key exists on the workstation.

How is that possible ?

 Code:
IF $OSVER64 = 1
        READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 60.3.0 ESR (x64 fr)","DisplayName")
        IF @ERROR = 0
	   EXIT
        ELSE
        ENDIF
      ELSE
        READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 60.3.0 ESR (x86 fr)","DisplayName")
        IF @ERROR = 0
	   EXIT
        ELSE
        ENDIF
	READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 60.3.0 ESR (x86 fr)","DisplayName")
        IF @ERROR = 0
	   EXIT
        ELSE
        ENDIF
      ENDIF


Thanks for the answer.

Top
#213620 - 2018-11-21 03:56 AM Re: Error control returns abnormal value [Re: yellowdog]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4480
Loc: USA
Is this what you need?
http://www.kixtart.org/manual/Functions/KeyExist.htm

Top
#213621 - 2018-11-21 04:17 AM Re: Error control returns abnormal value [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4480
Loc: USA
Or
 Code:
if READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 60.3.0 ESR (x64 fr)","DisplayName")=""
  ;do stuff
else
  ;do something else
endif

Top
#213622 - 2018-11-21 09:29 AM Re: Error control returns abnormal value [Re: Allen]
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Thanks a lot Allen, it's working better now.
Top
Page 1 of 1 1


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

Who's Online
2 registered (b15145, mole) and 194 anonymous users online.
Newest Members
Stefan_H, khalidkhan786, BigDGeorge, jefff, QCarvalho
17672 Registered Users

Generated in 0.029 seconds in which 0.011 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