ASP.Net Core Read Registry

Got a problem you cannot solve? Try here.
ngurram
Posts: 36
Joined: Mon Jun 08, 2020 6:54 pm

ASP.Net Core Read Registry

Postby ngurram » Tue Jun 09, 2020 10:48 am

Hi,
I am trying to use Read Registry for HKEY_LOCAL_MACHINE\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sharedhost like below

Set Variable ASPNet to
Read Registry Key HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sharedhost\Version into ASPNet
MessageBox: ReturnASPNet, $ASPNet$

But the return in the variable is always blank, even though I can see the registry for it on the box exists.
Has anyone else run into this issue? Help please?

Any help is much appreciated.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: ASP.Net Core Read Registry

Postby FrancescoT » Tue Jun 09, 2020 12:37 pm

Because I suppose you are checking such key on x64 target OS, are you switching to x64 mode before invoking the "Read Registry key" command?
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

ngurram
Posts: 36
Joined: Mon Jun 08, 2020 6:54 pm

Re: ASP.Net Core Read Registry

Postby ngurram » Tue Jun 09, 2020 3:15 pm

Thanks for the reply Francesco. Yes I am looking in x64 OS (Windows Server 2016 / 2019). I am not sure how I should switch to x64 mode though. Is this something to be done in IA?

Thanks

ngurram
Posts: 36
Joined: Mon Jun 08, 2020 6:54 pm

Re: ASP.Net Core Read Registry

Postby ngurram » Tue Jun 09, 2020 7:26 pm

I Googled it and I think I got it working. For anyone else who may run into this issue, below seem to work for me.

Set Variable ASPNet to
Set x64 - Native 64 bit Windows, AMD64, EM64T, and ARM64 Architectures - installation mode
Read Registry Key HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\sharedhost\Version into ASPNet

mdavtec
Posts: 27
Joined: Wed Jan 20, 2016 2:59 pm

Re: ASP.Net Core Read Registry

Postby mdavtec » Wed Apr 21, 2021 7:43 am

Don't forget to set the mode back to 32 bit after reading the registry

Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
ExchA


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 36 guests