PDA

View Full Version : Determining update vs initial installation



NewsArchive
03-19-2007, 05:22 AM
Hi there,

I have a customer base of over 150 and I have continual problem with end
users installing updates in the wrong location. My install routine gets
(and puts) the path to/from the registry. Being a Clarion application, my
app is totally portable and it's easier to just copy the app folder than to
reinstall. Sometimes the reg info just isn't there.

In addition to reading and writing to the registry, I'm looking for a way to
determine tell the user that the selected install location represents a
fresh install, then they can back up and get the location right.

So I'm just looking for an approach to this problem. Any thoughts on the
best way to accomplish this?

Kingsley Klosson

NewsArchive
03-19-2007, 05:22 AM
A few thoughts:

1) Are you using the "Detect Previous Version" function intended for this?

2) You could try using the "Search for File" function to locate a file unique
to your system.

3) You might try also using an .ini file that would remain even if an overly
agressive registry cleaner looses the "Detect Previous Version" information. My
thought is this would be best as a last ditch solution if 1 and 2 fail.

Greg

NewsArchive
03-19-2007, 05:23 AM
My SB install writes the folder to the registry.
After that, though, each time my program runs it writes four things related
to this:
IN HKLM (the same for all users... but not workable with Vista)
My installation path
Date this registry entry was updated.

IN HKCU
My Installation path
Date this registry entry was updated

That way, my installer can read all of the above, and go with whichever
installation path has the fresher date.

Of course, if the last path was written into HKCU and now a different user
is running the installation, the data could be wrong. But it's worked
pretty well.

Jane