Updating an existing intallation

The place where ProMatrix users can post coding tips and utilities they create.

Updating an existing intallation

Postby JessicaLawson » Sun Jun 13, 2010 4:18 pm

Attached is a (virtually) blank Installaware project template for updating
installations without affecting registry settings, or the system attempting
to uninstall first. It will simply delete, copy, and over-write files as you
require.

It has been designed to update existing Installaware installations, but may
well update installations done with other packages. However this has not
been tested.

Unzip into a blank Installaware project folder.

Points to note:

Files to be updated are stored using the Creatives option under User
Interface. Adding a file places a *copy* in the Installaware project folder,
so if e.g. the main application exe is updated each time, you must remove it
first from the list, then add it again. i.e. it is not called dynamically
from your vpme folder. For this example I have assumed that I am updating
the ssysuaud report.

See project properties and Build Settings to set up as appropriate for your
application.

Click on MSICode and scroll to near the bottom and you will see how the
files are updated using the ssysuaud report example. There are two files,
both stored in the Reports sub-folder of the targetdir.

After the installation I am running notepad with update.txt (also stored via
Creatives) to advise users that menu items may have been added, and they
need to give themselves permission to see any new options.

Check and adapt what dialogs have been selected, and the text for the EULA
and Readme and adapt as appropriate (readme.rtf and license.rtf)

The joy of this system is that you can update, overwrite, add any files you
like without it getting upset over the registry, attempting to uninstall etc
etc.

Sincerely

Stephen Ibbs
JessicaLawson
 
Posts: 79
Joined: Sun Jun 13, 2010 1:23 pm

Re: Updating an existing intallation

Postby JessicaLawson » Sun Jun 13, 2010 4:19 pm

I posted this here sometime in the past, but it is gone, so I will post it again.

The attached zip file contains a sample INI file and a PRG representation of a project hook class. The code will not work as is unless the user has the ProSysPlus libraries. However, the calls to the PSP functions are pretty much self explanatory, so a user could figure out how to do the same things with VPM or native VFP. In particular, I used PSP Library functions to close tables and to read from an INI file.

The class structure assumes the PSP parent classes, so, a user would need to define the class within the available class hierarchy. Nothing exotic, just an understanding of class structures and hierarchies is required.

The code in the ProjectHook class will add the specified DBCs at build time when an EXE is being built, and remove them after the build. If the DBC is in the project all the time, the project opens the DBCs and prevents certain functions when exclusive use of the DBC is required. Adding and removing them at build time solves the problem.

--
Steve Buttress
ProMatrix MVP - Life
ProSysPlus Developer
Microsoft Certified Professional

"Above all, we must realize that no arsenal, or no weapon in the arsenals of the world, is so formidable as the will and moral courage of free men and women. It is a weapon our adversaries in today's world do not have." RR - Jan. 21, 1985
You do not have the required permissions to view the files attached to this post.
JessicaLawson
 
Posts: 79
Joined: Sun Jun 13, 2010 1:23 pm


Return to ProMatrix User Library

Who is online

Users browsing this forum: No registered users and 2 guests

cron