Installation Source Registry Key
The HTTP(S) URL of the server to which reporting information is sent for client computers that use the WSUS server that is configured by the WUServer key. This policy is paired with WUServer, and both keys must be set to the same value to be valid.
I have tried using ManagementObjectSearcher( 'Select * from Win32_Product' ) and looking in the various 'MicrosoftWindowsCurrentVersionUninstall' registry keys but I cannot locate the office 2013 home and business information problematically using C# (even though I can see it in the registry using RegEdit).
I can, however, detect previous versions of office (e.g. 2003) using both methods
Please can someone point me in the right direction.
I have tried on machines using Windows 8 and Server 2008 R2 Versions of windows OS.
Many thanksJon
1 Answer
This is because you run application as 32bit, but Office is listed on 64bit registry branch. You can't access it from .NET 2.0 alone (it's possible in the newest version).You have to use Wow64 view.
Open Source Registry Cleaner
The code that just works (on .NET 2.0).
Not the answer you're looking for? Browse other questions tagged c#registryoffice-2013 or ask your own question.
I'm creating an installer for Microsoft Office, specifically for 2007 - 2013 versions. It just copy some files inside two Office's directories. My Windows is 64bit but I want to create a installer for both x64 and x86 architectures.
So I wrote the following code that tries to take from the Windows registry the Office's installation path. And, for each version of Office (2007 - 2013), it takes the installation's path and append the rest of the path I need. That's the result I want.
With one of the paths, I tried to set the file's installation path (DestDir) in Inno Setup like this:
But if I pass the parameters style or bibform, the function officeInstallDir should help me set the correct path for each line. But RegKeyExists or RegQueryStringValue doesn't find the registry's subkeys. I even tried using the GetHKLM() function because the 64bit node problem but no go.
Would anyone help me?
2 Answers
When running 32 bit setup on 64 bit system, Inno will automatically expand HKLM
as HKEY_LOCAL_MACHINESOFTWAREWow6432Node
what means you don't have to manipulate here unless there is 64 bit office installed which may hold his Registry info in 64 bit registry branch. But then you can do additional check for HKLM64
if IsWin64 = true
. Although you have to pass it as String
but notInteger
as you do in your code.
I would call it this way (but I don't quite understand the final part of your code thus I have just pasted it):
With your help, this is my final solution to the problem. I noted that I missed the final double quote in line 64 (DestDir parameter).
Thanks for all, folks!