How to find Office 2013 installation path programmatically? - windows

I'd like to find the installation path of Office 2013 programmatically.
I saw in this discussion that the method working for Office 2007 and 2010 (looking in the HKLM\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot registry key) doesn't work anymore for Office 2013 and that the best way is to look into the registry keys
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{91150000-0011-0000-0000-0000000FF1CE}
for Windows 32-bits or
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{91150000-0011-0000-0000-0000000FF1CE}
for Windows 64-bits.
Is this supposed to work on every computer and for all versions of Office 2013 (Small business, Professional, etc) and Windows (7 and 8)? Or is there another solution?

You are almost there.
You can check uninstall registry key to get office install path.
As you mentioned registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{91150000-0011-0000-0000-0000000FF1CE}
{91150000-0011-0000-0000-0000000FF1CE} is like a product guid, you can treat it as a pattern to retrieve office path, I think they will be same installed on win7 or win8.
However, about different office version Small business, Professional... The guid may be same or different which depends on office implementation, you need to double confirm.

Related

How do I enable Developer Mode for Outlook 2010 by only using the registry?

I've researched this a bit and came up dry. I've checked HKCU/Software/Microsoft but Office is not listed. Our company uses Office 2010 Pro Plus. Under HKLM, I can see Office 14.0 but Outlook/Options keys are not there. I've created the DeveloperTools 32bit DWORD and set the value to 1 under HKLM and HKCU with the following paths, but neither worked:
HKCU/Software/Microsoft/Office/14.0/Outlook/Options/DeveloperTools = 1
HKLM/Software/Microsoft/Office/14.0/Outlook/Options/DeveloperTools = 1
I am trying to use the registry because I need to modify many machines within our domain and don't want to send an email out asking everyone to "check the box" so-to-speak. Thanks for anyone's help.
It looks like you have a wrong key - at least under Outlook 2013 the key is
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\General]
"ReportAddinCustomUIErrors"=dword:00000001
You can use the Process Monitor utility for monitoring the windows registry activity.
Also check out whether the Click2Run edition of Outlook is installed on the machine. See Verify Whether Outlook Is a Click-to-Run Application on a Computer for more information.

Automation of office word 2010 - library not registered

The solution is very simple but impossible.
I have office 2010 and office 2012 installed, VB6 fails to create a Word application object giving me no more than just a message saying that the DLL is not registered.
All attempts to remove and restore the DLL using the installer or third party DLL fails.
After removing everything office related and only installing office 2010, the application object gets created successfully. But this is not a viable solutions for our customers: we can't have them removing their Office suites for this.
Is there any other way?
I had a similar issue on my dev machine with two versions of office. Cast your eye over this article from Microsoft support they mention the /regserver command line option. The article is Office automation when multiple versions of Office are installed. By the looks of it I don't think you can force it to pick one version or the other but the /regserver will help you in your dev environment.

Visual Studio 2010 and Clickonce: old .NET and office prerequisites

I am currently preparing an application in Visual Basic, mostly targeted on systems with .NET 2 installed and office 2003.
Moreover, as the systems are corporate ones, they need administrstion rights, so I had in mind an app that does not need to install anything (or register).
The application uses an external ocx, an axwebbrowser ocx and an excel interop.
The first problem stands because a user cannot run the application as it crashes, seeming because cannot find on his system ahdocvw.dll. is there a way to install for example a redistr package that includes the axwebbrowser system xomponent? At least to append it on the clickonce setup.
Second, in case that the user does not have the required framework, I would like to add on the Clickonce prerequisite box, the option for .NET 2 and office 2003. Right now, VS 2010 has only available .NET 3.5+ and Office Pia 2007.... could you suggest to me on how to proceed?

I'd like to use VS 2010 Pro on 4 workstations, what MSDN Subscription or licensing model is best?

I'd be the only one using the product, but I'll need to install VS on 4 different computers: My office Desktop, one virtual machine, my home desktop and my laptop.
I've been using the MSDN Operating Systems subscription for a number of years so I have a general idea of what I'm allowed to do, but I don't understand if a Visual Studio Professional with MSDN allows me to install multiple copies of VS Pro.
To give you an idea of what I'm looking for, I'm currently using Delphi 2010 Named User: this allows me to install Delphi on multiple computers, given I'm the only one using those Delphi installations.
The license is per-user, so you can install it on any number of devices, but it is licensed only for you to use. This is printed in clear text in the Visual Studio 2010 and MSDN Licensing White Paper:
Any team member can install and use
MSDN software on as many devices as
they like. The license does not
restrict where the device is located
(at work, at home, at school, at a
customer’s office, etc.). However,
each user of that MSDN software must
have an appropriate MSDN subscription.

Office XP Shared Addin VS 2008

I'm trying to create a Shared Addin using VS 2008 for Office XP (Excel to be precise). However, after creating the project in Visual studio and changing the references to Office XP (apart from Extensibility which I don't seem to be able to find a copy for office xp) and adding excel.exe to the references as well. I now don't seem to be able to get the addin to install on any computers.
Does anyone have any guides on writing Office XP addins using VS 2008 (Com Addins I might add)?
Does anyone know the reference that I'm meant to have or things prior that I'm meant to have installed on the pc?
I have three test pcs, this one has office xp, 2003 and 2007 on it and I can write an addin using 2003 references that runs on this but no other box. One with just office xp on it but also office xp PIAs installed and .NET and another one just with office xp on.
Any help would be very much appriciated.
I found the problem with this in the end.
The problem came from a KB entry 908002. Unfortunatley, to run the fix you need Visual Studio 2005 and Office 2003 installed otherwise it won't deploy the fix and so I had glossed over this quite a few times. In the end I found an old copy of VS2005 and Office 2003 on a spare machine, installed the fix, created an installer and tried it on a machine with Office XP and everything worked fine.
There are two fixes that are needed for this to work on any machine with Office XP:
extensibilityMSM.msi - installs the extensibility.dll
lockbagRegKey.msi - adds a fix to a registry key
I couldn't find these to be downloaded seperately from the KB908002 fix but I have copies locally.
After applying these fixes it was easy to use COM Addins like using VSTO and it took me less than an hour to write the actual code. I'm not looking for a way to include these in my MSI installer as prerequesites.
Any questions chuck them in a comment and I'll try and update asap.
You need the PIAs installed as a prerequisite. Does the addin install at all, or fail at installation? An add-in misbehaving at startup may be banned by the host application (Excel). You can reneable it in the Add-in settings dialog in Excel.
#PintSizedCat - Here is a link to a msdn blog that shows how to extract the msi's without having VS2005 installed.
See the section "Building the Shared COM add-in setup project" - use the command line:
vs2005-kb908002-enu-x85.exe /T:”C:\Test” /C
For us it was Excel 2003 with .Net 2.0 and the extensibility.dll was missing. I don't think VS2008 / VS2010 have this as a prerequisite. The dll is not redistributable (According to this blog - see the "The Answer" section) - you must use the msi to redistribute it.

Resources