Page 1 of 1 1
Topic Options
#212029 - 2016-10-18 01:37 AM ReadValue doesn't work
KixNewbie2016 Offline
Just in Town

Registered: 2016-10-18
Posts: 3
Loc: Canada
Hi there,

I wanted to check the Office 365 version by querying the registry. I created a very basic kix but seems not working. Did I miss anything? Please advise and thank you so much.

$ver = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration","Platform")
? "The version is: $ver"

and from the console, just got The version is: (nothing after:)
Testing on Win7 and Win10 no luck. Running kix 4.61


Edited by KixNewbie2016 (2016-10-18 01:39 AM)

Top
#212030 - 2016-10-18 04:18 AM Re: ReadValue doesn't work [Re: KixNewbie2016]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Welcome to KORG!

Remember that Kix is a 32-bit application and as such, can't directly see the 64-bit reg keys without some "magic".

One way is to reference the "redirected" path - "HKLM\SOFTWARE\WOW6432Node\microsoft\..."
The other way is to turn off the automatic redirection with
 Code:
$Rc = SetOption('WOW64AlternateRegView', 'Off')


Either way, you'll see the paths you want. \:\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212032 - 2016-10-18 05:51 PM Re: ReadValue doesn't work [Re: Glenn Barnas]
KixNewbie2016 Offline
Just in Town

Registered: 2016-10-18
Posts: 3
Loc: Canada
Thanks Glenn, much appreciate it. I've put your code into my test kix, but still show nothing :(, the key value is valid though.
--------------------------
$Rc = SetOption('WOW64AlternateRegView', 'Off')
$ver = ReadValue("HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration\","Platform")
? "version is $ver"

Top
#212033 - 2016-10-18 07:50 PM Re: ReadValue doesn't work [Re: KixNewbie2016]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Sorry - Copy/Paste issue - set the alt reg view to "On".

I don't have the same key, but when querying a similar path, I got null results with the setting "Off" but correct data with it "On".

You might need to read the Release Notes to find the info on this setting. ;\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212034 - 2016-10-18 09:15 PM Re: ReadValue doesn't work [Re: Glenn Barnas]
KixNewbie2016 Offline
Just in Town

Registered: 2016-10-18
Posts: 3
Loc: Canada
Awesome, it's working now. Thank you so much Glenn!
Top
#212035 - 2016-10-19 03:59 AM Re: ReadValue doesn't work [Re: KixNewbie2016]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Most welcome!
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212042 - 2016-10-20 03:47 AM Re: ReadValue doesn't work [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=208400
_________________________
!

download KiXnet

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 1383 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.024 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