473,796 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to check for installed compnents?

I'm trying to create an MSI in VS.NET that will check for installed Office
System components - so my MDE will only install if requirements are met.
I'm thinking about using VBScript to inspect Registry keys/values. Anyone
travel this road before? Other suggestions?

Thanks in advance.
Nov 12 '05
32 5135
Trevor Best <nospam@localho st> wrote in
news:40******** *************** @auth.uk.news.e asynet.net:
Terry Kreft wrote:
I realise these are first attempts but both are flwed to some
extent as the Office folder path is hardcoded.


I don't try to be too clever when writing aircode or modifying
someone elses code for usenet purposes, had I been writing this in
a real app I would have used SysCmd(acSysCmd AccessDir), a bit
easier than snooping around the registry :-)


Wow, I feel dumb.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #11
Trevor Best <nospam@localho st> wrote in
news:40******** *************** @auth.uk.news.e asynet.net:
deko wrote:
would have used SysCmd(acSysCmd AccessDir), a bit easier than
snooping around the registry :-)

I came up with this, but in testing it never ran - I just got the
"Missing Reference" errors. The start up form never had a chance
to open. Oh well, back to the Installer...

Anyway, thanks for the help.


That's because you're using early binding still, you will need to
uncheck the references and use late binding (use early binding for
development to get intellisense, etc), then for example change:

Dim wb as new excel.workbook
wb.dosomthing

to

dim wb as object
set wb=createobject ("excel.workboo k")
wb.dosomthing


And you'll want to have error correction in there to handle the lack
of Excel being installed.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #12
David W. Fenton wrote:
Trevor Best <nospam@localho st> wrote in
news:40******** *************** @auth.uk.news.e asynet.net:

deko wrote:

would have used SysCmd(acSysCmd AccessDir), a bit easier than
snooping around the registry :-)
I came up with this, but in testing it never ran - I just got the
"Missing Reference" errors. The start up form never had a chance
to open. Oh well, back to the Installer...

Anyway, thanks for the help.


That's because you're using early binding still, you will need to
uncheck the references and use late binding (use early binding for
development to get intellisense, etc), then for example change:

Dim wb as new excel.workbook
wb.dosomthi ng

to

dim wb as object
set wb=createobject ("excel.workboo k")
wb.dosomthi ng

And you'll want to have error correction in there to handle the lack
of Excel being installed.


Isn't that the point of the thread? To check that Excel is installed
when first run?
--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #13
You're right Trevor that syscmd would work in an installed db but I thought
this thread was about installing it?

--
Terry Kreft
MVP Microsoft Access
"Trevor Best" <nospam@localho st> wrote in message
news:40******** *************** @auth.uk.news.e asynet.net...
Terry Kreft wrote:
I realise these are first attempts but both are flwed to some extent as the Office folder path is hardcoded.


I don't try to be too clever when writing aircode or modifying someone
elses code for usenet purposes, had I been writing this in a real app I
would have used SysCmd(acSysCmd AccessDir), a bit easier than snooping
around the registry :-)

--
Error reading sig - A)bort R)etry I)nfluence with large hammer

Nov 12 '05 #14
> Isn't that the point of the thread? To check that Excel is installed
when first run?


The Windows Installer, I think, is the best solution for this kind of thing.
I've set up a Launch Condition in the Installer that checks for the .exe
files - seems to work pretty well (I had thought this would require VBScript
in a Custom Action). The install aborts if a component is missing. The
joker in the pack is if the user did a custom install of Office (since I use
a hard-coded path to the exe). Reading the Path value in the InstallRoot
Key and using that in the Launch Condition may take some more tinkering.

The other issue is dealing with References - If I develop in Office 2003,
then my references are to the Office11 libraries. When I make the MDE,
these references are compiled into the app. So the app will only run with
Office 2003. I assume this means I will have to somehow down-rev the app
for Office 2002 and set References for the Office10 libraries if I want to
distribute to clients running Office 2002. So I have to offer 2 different
versions: one for Office 2002 and one for Office 2003. Is this correct?

.... anyone going to Mountain View tonight for the C# Roadshow?
Nov 12 '05 #15
deko wrote:
Isn't that the point of the thread? To check that Excel is installed
when first run?

The Windows Installer, I think, is the best solution for this kind of thing.
I've set up a Launch Condition in the Installer that checks for the .exe
files - seems to work pretty well (I had thought this would require VBScript
in a Custom Action). The install aborts if a component is missing. The
joker in the pack is if the user did a custom install of Office (since I use
a hard-coded path to the exe). Reading the Path value in the InstallRoot
Key and using that in the Launch Condition may take some more tinkering.

The other issue is dealing with References - If I develop in Office 2003,
then my references are to the Office11 libraries. When I make the MDE,
these references are compiled into the app. So the app will only run with
Office 2003. I assume this means I will have to somehow down-rev the app
for Office 2002 and set References for the Office10 libraries if I want to
distribute to clients running Office 2002. So I have to offer 2 different
versions: one for Office 2002 and one for Office 2003. Is this correct?

... anyone going to Mountain View tonight for the C# Roadshow?

Just the lowest common denomiator is needed I think. If your app
references Exec10, then Access 2003 would be old enough and ugly enough
to work out that Excel11 will do.
--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #16
Terry Kreft wrote:
You're right Trevor that syscmd would work in an installed db but I thought
this thread was about installing it?


After reading deko's last response I see that's the case. D'oh!

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #17
Hi Folks,

This conversation is quite a ways over my head, but I've been following this
thread thinking "I seem to remember something about a program that allowed
you to package all of the required libraries with your distribution". This
is probably similar to the MSI that Deko has been talking about?

Does your program actually require that Excel is installed, or just it's
libraries etc.? I really don't know a lot about the developer aspect and the
associated legalities. If all that is required is the library files, is it
legal to distribute them seperately, if they a dependency of another
application developed using a Microsoft application (Access)?

Anyway, the program that I'm thinking of is called Active Delivery. It
claims to be able to put you in control of the install paths and
modifications to the Windows Registry, etc. If you're interested (and you
guys will understand it better than I do for sure) have a look at:
http://www.activedelivery.com/ad/index.htm

===========
HTH, Don

"Terry Kreft" <te*********@mp s.co.uk> wrote in message
news:py******** ************@ka roo.co.uk...
You're right Trevor that syscmd would work in an installed db but I thought this thread was about installing it?

--
Terry Kreft
MVP Microsoft Access
"Trevor Best" <nospam@localho st> wrote in message
news:40******** *************** @auth.uk.news.e asynet.net...
Terry Kreft wrote:
I realise these are first attempts but both are flwed to some extent
as
the Office folder path is hardcoded.


I don't try to be too clever when writing aircode or modifying someone
elses code for usenet purposes, had I been writing this in a real app I
would have used SysCmd(acSysCmd AccessDir), a bit easier than snooping
around the registry :-)

--
Error reading sig - A)bort R)etry I)nfluence with large hammer


Nov 12 '05 #18
> This conversation is quite a ways over my head, but I've been following
this
thread thinking "I seem to remember something about a program that allowed
you to package all of the required libraries with your distribution". This
is probably similar to the MSI that Deko has been talking about?

Does your program actually require that Excel is installed, or just it's
libraries etc.? I really don't know a lot about the developer aspect and the associated legalities. If all that is required is the library files, is it
legal to distribute them seperately, if they a dependency of another
application developed using a Microsoft application (Access)?


I'm not sure how ActiveDelivery differs from the Windows Installer (i.e. an
msi package), but a key feature of this database is it's use of automation
to integrate with Word, Outlook, and Excel, so those apps need to be there.
The Windows Installer (as I am painfully aware) has a steep learning curve,
but is more than powerful enough for what I'm trying to do.

Caphyon offers a freeware wrapper for Windows Installer 2.0 that's great for
making simple msi's - http://www.advancedinstaller.com/download.html

When you build a Setup Project in Visual Studio, it creates an msi (both ver
2 and 3, I think), and also a setup.exe, which is nice. If you can figure
out the Conditional Statement syntax for Launch Conditions, and write
VBScript for Custom Actions, you've got everything you need. Still, some
will say InstallShield is the gold standard... if you've got the gold to buy
it...
http://www.installshield.com/products/comparison.asp
Nov 12 '05 #19
Trevor Best <nospam@localho st> wrote in
news:40******** **************@ auth.uk.news.ea synet.net:
deko wrote:
Isn't that the point of the thread? To check that Excel is
installed when first run?

The Windows Installer, I think, is the best solution for this
kind of thing. I've set up a Launch Condition in the Installer
that checks for the .exe files - seems to work pretty well (I had
thought this would require VBScript in a Custom Action). The
install aborts if a component is missing. The joker in the pack
is if the user did a custom install of Office (since I use a
hard-coded path to the exe). Reading the Path value in the
InstallRoot Key and using that in the Launch Condition may take
some more tinkering.

The other issue is dealing with References - If I develop in
Office 2003, then my references are to the Office11 libraries.
When I make the MDE, these references are compiled into the app.
So the app will only run with Office 2003. I assume this means I
will have to somehow down-rev the app for Office 2002 and set
References for the Office10 libraries if I want to distribute to
clients running Office 2002. So I have to offer 2 different
versions: one for Office 2002 and one for Office 2003. Is this
correct?

... anyone going to Mountain View tonight for the C# Roadshow?


Just the lowest common denomiator is needed I think. If your app
references Exec10, then Access 2003 would be old enough and ugly
enough to work out that Excel11 will do.


But for the reference to work, doesn't the path have to be the same
for the Excel directory?

Late binding is still the way to go.

Then you could install the application even if Excel is not
installed, and the non-Excel dependent features could still be used.
With references, nothing at all is going to work, ever.

I can't see why anyone would use anything other than late binding,
except if they don't know any better.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
537
by: deko | last post by:
I'm trying to create an MSI in VS.NET that will check for installed Office System components - so my MDE will only install if requirements are met. I'm thinking about using VBScript to inspect Registry keys/values. Anyone travel this road before? Other suggestions? Thanks in advance.
0
9683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.