Jean-Guy
Fri Aug 11 12:18:20 CDT 2006
Jonathan West was telling us:
Jonathan West nous racontait que :
> "Jean-Guy Marcil" <NoSpam@LeaveMeAlone> wrote in message
> news:OZ3%23XsVvGHA.5044@TK2MSFTNGP05.phx.gbl...
>> Jonathan West was telling us:
>> Jonathan West nous racontait que :
>>
>>> "Jean-Guy Marcil" <NoSpam@LeaveMeAlone> wrote in message
>>> news:%234rgI1UvGHA.5088@TK2MSFTNGP06.phx.gbl...
>>>> 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?
>>
>>
>> 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...
>
>>
>>> 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?
>
> 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.
Ah, yes, the great advantage of managed code...
>>>>
>>>> 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.
>>
>> 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!
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
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org