VSTO runtime installation / distribution concerns

D

Dave Calkins

We're looking into using the "Visual Studio Tools for Office" from our app in
order to create Excel files.

I noticed the below note on MSDN.

"How to: Install the Visual Studio Tools for Office Runtime
- You do not need to install Microsoft Office applications on computers
that you install the Visual Studio Tools for Office runtime on. For example,
you can install the runtime on a server and use the ServerDocument object to
access document files. If you do need Office applications on the computer,
install them before you install the runtime. If you install Office after
installing the runtime, you must run VSTOR.exe again and repair the
installation."

This seems like a hassle, since the end-user will install my app and I have
no control over whether they install it before and/or after MS Office. I
just need it to "work" :)

Has anyone figured out a smooth way to package the VSTO runtime with your
app such that it "just works"? Is there some way of detecting that VSTO
needs to be re-run?
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RGF2ZSBDYWxraW5z?=,
This seems like a hassle, since the end-user will install my app and I have
no control over whether they install it before and/or after MS Office.
You could have your setup check for the presence of Excel (since that's your
target application) and tell the user he must first install Office 2003(!)
before he can install your app. You should be able to pull that information
from the HKCR in the Registry. Look for Excel.Application.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

Dave Calkins

Cindy M -WordMVP- said:
You could have your setup check for the presence of Excel (since that's
your
target application) and tell the user he must first install Office 2003(!)
before he can install your app. You should be able to pull that
information
from the HKCR in the Registry. Look for Excel.Application.

But with VSTO they don't have to have Office installed, which is kind of a
nice feature and, I don't have control over whether or not or the order in
which Office is installed.

So, it needs to work regardless. If they don't have office, if they have
office, if they don't have office, then later install office, etc.

From the MSDN docs, it looks like it'll work as long as you make sure to
re-install the VSTO runtime again if they should happen to do an office
reinstall/install.

Just seems like there has to be a simpler way than worrying about all that,
but perhaps not.
 
C

Cindy M -WordMVP-

Hi Dave,
But with VSTO they don't have to have Office installed, which is kind of a
nice feature and, I don't have control over whether or not or the order in
which Office is installed.
I'm sorry, I don't follow your thinking, here. VSTO doesn't include any kind
of runtime for Office applications. In order for someone to use VSTO they
must have a licensed copy of the application installed, locally.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

Dave Calkins

Cindy M -WordMVP- said:
Hi Dave,

I'm sorry, I don't follow your thinking, here. VSTO doesn't include any
kind
of runtime for Office applications. In order for someone to use VSTO they
must have a licensed copy of the application installed, locally.

I don't think that is correct. According to MSDN, you do not need to have
the Microsoft Office applications installed. The below is quoted from the
"How to: Install the Visual Studio Tools for Office Runtime" in the MSDN
Library (path is Development Tools and Languages => Visual Studio => Visual
Studio Tools for Office => Getting Started).

"You do not need to install Microsoft Office applications on computers that
you install the Visual Studio Tools for Office runtime on. For example, you
can install the runtime on a server and use the ServerDocument object to
access document files. If you do need Office applications on the computer,
install them before you install the runtime. If you install Office after
installing the runtime, you must run VSTOR.exe again and repair the
installation."

So, if you're using VSTO and have the VSTO runtime, your code can run on
machines with or without Office installed, which is a nice perk. The issue
here is the comment about having to re-install the VSTO runtime (VSTOR.exe)
in the event Office is installed after installing the VSTO runtime.

i.e., VSTO gives me the ability to create Office documents with or without
Office installed, since I can just install the VSTO runtime, however,
apparently I have to somehow know if they install/re-install Office after
I've installed VSTO runtime so I can re-install the VSTO runtime....
 
C

Cindy M -WordMVP-

Hi Dave,

Mmmm. I think you need to head over to the VSTO forum if you don't believe me.
Be very specific about the kind of thing you intend to do in your solution.
The statement you quote doesn't say you can do "everything with Office". It
says you can ACCESS document files using the *ServerDocument* object. As I
understand it, this means you can work with EXISTING Excel or Word files in
order to link your VSTO solution to them, extract information from a datacache
VSTO has created and things like that. This is expressly designed to enable
working with files in a SERVER environment, because one shouldn't automate
Office apps on a (unattended) server.

The statement does NOT say that this is going to enable users to work with
your VSTO interface if they don't have Office. Nor does it say you'll be able
to design VSTO solutions using the IDE in VS 2005. Depending on what you
actually want to do, it might be enough. But if you expect users to do
anything with the documents you create (beyond looking at them in a "Viewer" -
which is not part of VSTO), it's definitely NOT enough to install the VSTO
runtime on a machine.

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=16&SiteID=1&PageID=0
I don't think that is correct. According to MSDN, you do not need to have
the Microsoft Office applications installed. The below is quoted from the
"How to: Install the Visual Studio Tools for Office Runtime" in the MSDN
Library (path is Development Tools and Languages => Visual Studio => Visual
Studio Tools for Office => Getting Started).

"You do not need to install Microsoft Office applications on computers that
you install the Visual Studio Tools for Office runtime on. For example, you
can install the runtime on a server and use the ServerDocument object to
access document files. If you do need Office applications on the computer,
install them before you install the runtime. If you install Office after
installing the runtime, you must run VSTOR.exe again and repair the
installation."

So, if you're using VSTO and have the VSTO runtime, your code can run on
machines with or without Office installed, which is a nice perk. The issue
here is the comment about having to re-install the VSTO runtime (VSTOR.exe)
in the event Office is installed after installing the VSTO runtime.

i.e., VSTO gives me the ability to create Office documents with or without
Office installed, since I can just install the VSTO runtime, however,
apparently I have to somehow know if they install/re-install Office after
I've installed VSTO runtime so I can re-install the VSTO runtime....

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

Dave Calkins

Cindy M -WordMVP- said:
The statement you quote doesn't say you can do "everything with Office".
It
says you can ACCESS document files using the *ServerDocument* object. As I
understand it, this means you can work with EXISTING Excel or Word files
in
order to link your VSTO solution to them, extract information from a
datacache
VSTO has created and things like that. This is expressly designed to
enable
working with files in a SERVER environment, because one shouldn't automate
Office apps on a (unattended) server.

That's fine; I don't need to do everything. And automation is exactly what
I want to do. The goal is to have the SW automatically generate Office
documents. Opening those documents with Excel/Word is something done later
and on different machines.
The statement does NOT say that this is going to enable users to work with
your VSTO interface if they don't have Office. Nor does it say you'll be
able
to design VSTO solutions using the IDE in VS 2005. Depending on what you
actually want to do, it might be enough. But if you expect users to do
anything with the documents you create (beyond looking at them in a
"Viewer" -
which is not part of VSTO), it's definitely NOT enough to install the VSTO
runtime on a machine.

I do not expect the users to be able to do anything with the created
documents. The intent is to allow them to have the SW create the documents
they need for them. The documents would then later be used on another
machine which has Office installed.

I guess it depends on the particular scope of the "solution". In my case,
the solution is creating Excel files on a machine which may or may not have
Excel. The documents will be used on a machine with Office.

However, I think this might be somewhat of a tangent. Assuming the VSTO
runtime gives me the functionality I need (which it may or may not), how do
I go about handling the runtime install in a smooth manner?

The real intent of my post was wrt how you manage runtime installation.
Perhaps there is functionality missing with just VSTO, however, since you
can have just VSTO installed and get some level of functionality, how do you
handle the runtime install?

Going back to the MSDN docs, you can install VSTO with or without Office
installed. However, if you install Office after having installed VSTO you
must re-install VSTO. Any ideas how to make this process smooth?
 
C

Cindy M -WordMVP-

Hi Dave,
Going back to the MSDN docs, you can install VSTO with or without Office
installed. However, if you install Office after having installed VSTO you
must re-install VSTO. Any ideas how to make this process smooth?
I refer you again to the VSTO-specific forum

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=16&SiteID=1&PageID=0

or the newsgroup on this server (but there's less traffic, there)

vsnet.vstools.Office

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top