Install project

J

Jean-Guy Marcil

HI all,

I have just spend 2 hours scanning the NG for info on this.

A lot of people seem to praise InnoSetup. So I downloaded it and read the
FAQ and some script examples.
The main problem I see is that these software are designed to install
executable files in (normally) the "Program Files" folder and also provide
an uninstall mechanism, both of which are unnecessary when installing
templates.

I cannot figure out how to tell it to install my templates in the current
user Workgroup Templates location (read from the registry?) and to make sure
that some of the templates stay hidden once they are installed. (One
template is used to invoke the other, and another one is not a template but
a database, so they need to be hidden.).

I need to make a deployment package for some very inept users who cannot be
trusted to follow installation instructions.

While I could create a Word file with autoexecuting code that would act as
an installation mechanism (this would still require distributing 4 documents
instead of one single installation package), it thought I might try to use a
"real" install tool so as to look more professional.

I also looked at VS 2003, it seemed way too complicated for such a simple
install.

I would really appreciate it if anybody can give some pointers on InnoSetup
(Or any other installation software).

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jonathan West

Hi Jean-Guy,

I must say that when I was looking round, I didn't find any of the
commercial installers up to the job of installing Office templates, so I
made my own.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
J

Jean-Guy Marcil

Jonathan West was telling us:
Jonathan West nous racontait que :
Hi Jean-Guy,

I must say that when I was looking round, I didn't find any of the
commercial installers up to the job of installing Office templates,
so I made my own.

With VB6, VS 2003, VS 2005 or something else?

How did you get many files inside one file to be distributed?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jonathan West

Jean-Guy Marcil said:
Jonathan West was telling us:
Jonathan West nous racontait que :


With VB6, VS 2003, VS 2005 or something else?

VB6. If the customer has Office 2K or later, you can guarantee that they
have the VB6 runtimes already installed.
How did you get many files inside one file to be distributed?

Put them all inside a Winzip self-extracting archive which automatically
runs the installer.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
J

Jean-Guy Marcil

Jonathan West was telling us:
Jonathan West nous racontait que :


Can you please bear with me a bit longer as I foray into the world of
programming outside VBA, about which I do not know a lot?
VB6. If the customer has Office 2K or later, you can guarantee that
they have the VB6 runtimes already installed.

Good point, If I use VS2003 to compile an exe, I guess that a user with
Windows 2000 and Office 2000 would not have the proper dll on his machine,
right?
Or, is it that once it is compiled as an exe, it does not matter what the
user has on his machine (I guess I am asking if a compiled exe is a true
stand alone executable file)
Put them all inside a Winzip self-extracting archive which
automatically runs the installer.

So, in a nutshell, you write code that queries the info you need for the
installation, copies the unzipped files to the desired location and then
deletes the unzipped files.

For this to work, you need to know the "starting folder" (where the unzipped
files are).

If you compile the code so that the resulting exe will be executed by WinZip
(or WinRar) after excretion, how do you code for that yet unknown location?
Is there in VB6 a method for reading the path were the exe being executed is
located ( a sort of "Selfpath" method or property)?

Or are you not using an exe at all?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jonathan West

Jean-Guy Marcil said:
Jonathan West was telling us:
Jonathan West nous racontait que :



Can you please bear with me a bit longer as I foray into the world of
programming outside VBA, about which I do not know a lot?

I don't know *that* much more...
Good point, If I use VS2003 to compile an exe, I guess that a user with
Windows 2000 and Office 2000 would not have the proper dll on his machine,
right?
Correct.

Or, is it that once it is compiled as an exe, it does not matter what the
user has on his machine (I guess I am asking if a compiled exe is a true
stand alone executable file)

No. Programs written in VB.NET or C# require the appropriate version of the
..NET framework to be installed. While those are downloadable from Microsoft,
you can't assume that people already have it.
So, in a nutshell, you write code that queries the info you need for the
installation, copies the unzipped files to the desired location and then
deletes the unzipped files.

Exactly so. In fact, if you configure the Winzip Self-extractor properly,
the deletion of the unzipped files is handled automatically by Winzip
itself.
For this to work, you need to know the "starting folder" (where the
unzipped files are).

If you compile the code so that the resulting exe will be executed by
WinZip (or WinRar) after excretion, how do you code for that yet unknown
location? Is there in VB6 a method for reading the path were the exe being
executed is located ( a sort of "Selfpath" method or property)?

Yes. When you unzip them they are in the same folder as the installer
executable. In VB6, the App.Path property gets you the folder where the
executable resides. The rest is easy!


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
J

Jean-Guy Marcil

Jonathan West was telling us:
Jonathan West nous racontait que :
I don't know *that* much more...


No. Programs written in VB.NET or C# require the appropriate version
of the .NET framework to be installed. While those are downloadable
from Microsoft, you can't assume that people already have it.

Ah, yes, the great advantage of managed code...
Exactly so. In fact, if you configure the Winzip Self-extractor
properly, the deletion of the unzipped files is handled automatically
by Winzip itself.


Yes. When you unzip them they are in the same folder as the installer
executable. In VB6, the App.Path property gets you the folder where
the executable resides. The rest is easy!

As you write, the rest is easy... except that I have to re-install VB6 on
top of VS 2003 (I have heard that they can co-habit without any problems on
the same system). I guess that once you have written one such package it is
trivial to adapt it to new projects...

Thanks for the info and the ideas.

p.s. One last question on this.. Is it easier to query the registry to get
to the Word "Workgroup Templates" path or to start an invisible Word
instance?
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jonathan West

Jean-Guy Marcil said:
As you write, the rest is easy... except that I have to re-install VB6 on
top of VS 2003 (I have heard that they can co-habit without any problems
on the same system). I guess that once you have written one such package
it is trivial to adapt it to new projects...

Thanks for the info and the ideas.

p.s. One last question on this.. Is it easier to query the registry to get
to the Word "Workgroup Templates" path or to start an invisible Word
instance?

It can be done either way. The advantages of going the registry route is
that it is quicker, once you have written the code. Starting up an invisible
copy of Word is time-consuming.

The disadvantage of registry route is that you would first have to work out
which version of Word is installed, because the registry keys are in
different places depending on which Office version you are using. It is
possible to find that out by querying the registry, but you would want to
test that code very carefully.

Also be aware that if the user hasn't changed the various folders in the
Tools Options File Locations tab away from the defaults, there is nothing in
the registry key at all, and you have to work out the folders relative to
the user's profile root folder.
 
J

Jean-Guy Marcil

Jonathan West was telling us:
Jonathan West nous racontait que :
It can be done either way. The advantages of going the registry route
is that it is quicker, once you have written the code. Starting up an
invisible copy of Word is time-consuming.

The disadvantage of registry route is that you would first have to
work out which version of Word is installed, because the registry
keys are in different places depending on which Office version you
are using. It is possible to find that out by querying the registry,
but you would want to test that code very carefully.

Also be aware that if the user hasn't changed the various folders in
the Tools Options File Locations tab away from the defaults, there is
nothing in the registry key at all, and you have to work out the
folders relative to the user's profile root folder.

Thanks for your thoughts.

So, all in all, the registry way executes faster, but requires more code to
cover all eventualities, whereas late-binding with Word will be simple to
code, but take longer to execute.

Thanks again.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jonathan West

Jean-Guy Marcil said:
Jonathan West was telling us:
Jonathan West nous racontait que :


Thanks for your thoughts.

So, all in all, the registry way executes faster, but requires more code
to cover all eventualities, whereas late-binding with Word will be simple
to code, but take longer to execute.

That's a perfect summary.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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