For Programmers: Free Programming Magazines  


Home > Archive > Smartphone Developer Forum > October 2005 > How to differentiate between reinstall and uninstall?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to differentiate between reinstall and uninstall?

2005-10-21, 9:56 pm

Hi,

PPC 2005 changed the sequence of calls to setup dll during reinstall.
Now it is:
Uninstall_Init
Uninstall_Exit
Install_Init
Install_Exit

My setup.dll does delete some private stuff during uninstall,
but it must not delete it during re-install.

Question is how to tell one from another?

Thank you
John


The PocketTV Team

2005-10-22, 7:57 am

We have the same problem.

We would like to keep the user preferences, registration keys, etc when a
re-install occurs (i.e. upgrade to a new version), but not when the
application is removed (uninstalled).

Apparently there is a no way to differenciate, since a re-install is
implemented as a uninstal, followed by an install.

Note that in previous versions of Pocket PC, re-install was not correctly
implemented either, and it could leave some dll's from a previous install
that would cause the new install to fail (if those dll were not part of the
new install), that's because previously, re-install did not do a proper
uninstal.

So now some problems are fixed but other new problems are created!

<John> wrote in message
news:c4idnSTIHax5AsTenZ2dnUVZ_sydnZ2d@sp
eakeasy.net...
> Hi,
>
> PPC 2005 changed the sequence of calls to setup dll during reinstall.
> Now it is:
> Uninstall_Init
> Uninstall_Exit
> Install_Init
> Install_Exit
>
> My setup.dll does delete some private stuff during uninstall,
> but it must not delete it during re-install.
>
> Question is how to tell one from another?
>
> Thank you
> John
>
>



SunWon

2005-10-23, 7:00 pm

I have an idea, don't use the registry to store configuration information.
The registry is a mess so it is much easier to just use your own file with
your own formating. Also it makes uninstalling the application a lot easier.

Anyway that is opinion.

SonWon

"The PocketTV Team" wrote:

> We have the same problem.
>
> We would like to keep the user preferences, registration keys, etc when a
> re-install occurs (i.e. upgrade to a new version), but not when the
> application is removed (uninstalled).
>
> Apparently there is a no way to differenciate, since a re-install is
> implemented as a uninstal, followed by an install.
>
> Note that in previous versions of Pocket PC, re-install was not correctly
> implemented either, and it could leave some dll's from a previous install
> that would cause the new install to fail (if those dll were not part of the
> new install), that's because previously, re-install did not do a proper
> uninstal.
>
> So now some problems are fixed but other new problems are created!
>
> <John> wrote in message
> news:c4idnSTIHax5AsTenZ2dnUVZ_sydnZ2d@sp
eakeasy.net...
>
>
>

The PocketTV Team

2005-10-24, 7:57 am

thanks, SonWon, but that does not solve the problem at all:

when the application is un-installed, you want to remove all files,
including any private file that you use for your configuration. so the
cesetup.dll must remove those file upon un-install.

so the problem is the same... you just moved it from one place to another,
without resolving it.

and in fact the registry is not that bad for storing configuration. it has a
number of advantages compared to using private files (e.g. can be easiely
edited or patched outside of the app).


"SunWon" <SunWon@discussions.microsoft.com> wrote in message
news:6081883C-A7AA-4F7F-B4D2-34F072A4041C@microsoft.com...[color=darkred]
>I have an idea, don't use the registry to store configuration information.
> The registry is a mess so it is much easier to just use your own file
> with
> your own formating. Also it makes uninstalling the application a lot
> easier.
>
> Anyway that is opinion.
>
> SonWon
>
> "The PocketTV Team" wrote:
>


SunWon

2005-10-24, 7:01 pm

Well, we differ here in opinion. Anyway, I've never used a cesetup.dll, but
couldn't you use an if( statement and test for the registry entry and if it
exist then leave the entry alone?

SonWon

"The PocketTV Team" wrote:

> thanks, SonWon, but that does not solve the problem at all:
>
> when the application is un-installed, you want to remove all files,
> including any private file that you use for your configuration. so the
> cesetup.dll must remove those file upon un-install.
>
> so the problem is the same... you just moved it from one place to another,
> without resolving it.
>
> and in fact the registry is not that bad for storing configuration. it has a
> number of advantages compared to using private files (e.g. can be easiely
> edited or patched outside of the app).
>
>
> "SunWon" <SunWon@discussions.microsoft.com> wrote in message
> news:6081883C-A7AA-4F7F-B4D2-34F072A4041C@microsoft.com...
>
>
>

The PocketTV Team

2005-10-24, 7:01 pm

> Well, we differ here in opinion.

It's a matter of "facts" not a matter of opinions.

How do you remove the configuration files upon un-install?

Or do you leave this file somewhere even after the application is
un-installed? that's not very "clean"...

> Anyway, I've never used a cesetup.dll,


Then I don't see how you can clean-up a configuration file. If you place
your application config and preferences in the registry, then you don't need
a cesetup.dll, since the installer can remove the reg keys and values
created by the CAB upon install.

> but
> couldn't you use an if( statement and test for the registry entry and if
> it
> exist then leave the entry alone?


Then you would leave things around in the registry after un-install... this
is what we do, until we can find a good workaround to solve the re-install
issue discussed in this thread. but doing so is not clean, and it does not
comply with the requirements for MSFT "logo compliance".
[color=darkred]
>
> SonWon
>
> "The PocketTV Team" wrote:
>


2005-10-24, 7:01 pm

You're totally missing the point. Whether the config is in the registry, a
file, a database or written in the sand is not relevent. The issue is
there's not way to know if a user is uninstalling or upgrading from the
installer, and therefore there's no way to easily keep your settings during
an upgrade while also meeting logo requirements for a completely clean
uninstall (well a kluge comes to mind involving a separate process, but
that's really, really ugly).

-Chris


"SunWon" <SunWon@discussions.microsoft.com> wrote in message
news:6238DA9A-A03C-4BA0-A075-9AAA10F47771@microsoft.com...[color=darkred]
> Well, we differ here in opinion. Anyway, I've never used a cesetup.dll,
> but
> couldn't you use an if( statement and test for the registry entry and if
> it
> exist then leave the entry alone?
>
> SonWon
>
> "The PocketTV Team" wrote:
>


SunWon

2005-10-24, 7:01 pm

Ah, the light went on when I reread your original post. The sequence is the
problem since everything is uninstalled with the first two calls to the dll.
I avoided that headache by placing the user settings into the My Documents
directory. The uninstaller never knows the files exist since my application
creates the files on first use and monitors them for corruption on every use.
The plus side is the users settings are backed up with every sync. The
downside is the user has to delete the directory later on if they ever decide
to stop using the application. But this is no different than deleting any
documents they've created using PocketWord, PocketExcel, etc. So I don't
believe this is a problem.

SonWon

"<ctacke/>" wrote:

> You're totally missing the point. Whether the config is in the registry, a
> file, a database or written in the sand is not relevent. The issue is
> there's not way to know if a user is uninstalling or upgrading from the
> installer, and therefore there's no way to easily keep your settings during
> an upgrade while also meeting logo requirements for a completely clean
> uninstall (well a kluge comes to mind involving a separate process, but
> that's really, really ugly).
>
> -Chris
>
>
> "SunWon" <SunWon@discussions.microsoft.com> wrote in message
> news:6238DA9A-A03C-4BA0-A075-9AAA10F47771@microsoft.com...
>
>
>

2005-10-24, 7:01 pm

But by leaving that config file you violate the logo requirements for a
clean uninstall. In your case it works for your app, which is fine -
nothing wrong with that. But the installer provided by MS makes both
meeting their logo requirements and the user desired ability to not lose
settings on an upgrade conflict.

-Chris


"SunWon" <SunWon@discussions.microsoft.com> wrote in message
news:7344E7D0-BDAA-4C3A-94D1-584E8871F442@microsoft.com...[color=darkred]
> Ah, the light went on when I reread your original post. The sequence is
> the
> problem since everything is uninstalled with the first two calls to the
> dll.
> I avoided that headache by placing the user settings into the My Documents
> directory. The uninstaller never knows the files exist since my
> application
> creates the files on first use and monitors them for corruption on every
> use.
> The plus side is the users settings are backed up with every sync. The
> downside is the user has to delete the directory later on if they ever
> decide
> to stop using the application. But this is no different than deleting any
> documents they've created using PocketWord, PocketExcel, etc. So I don't
> believe this is a problem.
>
> SonWon
>
> "<ctacke/>" wrote:
>


The PocketTV Team

2005-10-24, 7:02 pm

"<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message
news:%23DhgQ3J2FHA.2792@tk2msftngp13.phx.gbl...
> You're totally missing the point. Whether the config is in the registry,
> a file, a database or written in the sand is not relevent. The issue is
> there's not way to know if a user is uninstalling or upgrading from the
> installer, and therefore there's no way to easily keep your settings
> during an upgrade while also meeting logo requirements for a completely
> clean uninstall (well a kluge comes to mind involving a separate process,
> but that's really, really ugly).


correct.


The PocketTV Team

2005-10-24, 7:02 pm

> The
> downside is the user has to delete the directory later on if they ever
> decide
> to stop using the application.


Another downside is that your application cannot be MSFT "logo compliant".


The PocketTV Team

2005-10-24, 7:02 pm

"<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message
news:ehif2OK2FHA.3192@TK2MSFTNGP15.phx.gbl...
> But by leaving that config file you violate the logo requirements for a
> clean uninstall. In your case it works for your app, which is fine -
> nothing wrong with that. But the installer provided by MS makes both
> meeting their logo requirements and the user desired ability to not lose
> settings on an upgrade conflict.


I just cannot believe that no-one at MSFT thought about this issue.

well, yes, in fact, i can believe it, since MSFT is mostly making apps that
are bundled in ROM, they never have to worry about installing upgrades.
They prefer user to buy new devices!

this is a real problems for third party developers who want to be
logo-compliant and who want to make upgrading application painless for users
(i.e. keep the registration key and user preferences).


2005-10-24, 7:02 pm

> I just cannot believe that no-one at MSFT thought about this issue.

I'm even more surprised that in this many versions of PPC they haven't come
up with a better solution.

> this is a real problems for third party developers who want to be
> logo-compliant and who want to make upgrading application painless for
> users (i.e. keep the registration key and user preferences).


And even more so because once devices are in the market, they don't often
get updated. At the very least they should relax the logo requirements. At
best they should have a ROM update. In between maybe they could provide a
installer replacement to be installed with your app (assuming it's a
replaceable module in the image).

-Chris


SunWon

2005-10-24, 7:02 pm

Probably true , but I don't know why not since when I uninstall Microsoft
Office it leaves behind all sorts of DOC and XLS files?

SonWon



"The PocketTV Team" wrote:

>
> Another downside is that your application cannot be MSFT "logo compliant".
>
>
>

2005-10-24, 7:02 pm

You can't uninstall Pocket Excel or Pocket Word - so they don't have to meet
this logo requirement.

-Chris



"SunWon" <SunWon@discussions.microsoft.com> wrote in message
news:6B7FB960-02BB-472D-A29D-4C96385AD47B@microsoft.com...[color=darkred]
> Probably true , but I don't know why not since when I uninstall Microsoft
> Office it leaves behind all sorts of DOC and XLS files?
>
> SonWon
>
>
>
> "The PocketTV Team" wrote:
>


r_z_aret@pen_fact.com

2005-10-25, 7:03 pm

Do the logo requirements allow leaving some sort of temp file (perhaps
in the folder with all the Pocket IE temp files) during uninstall? If
so, the uninstall could put settings in a temp file, and the
(re)install could read the settings from that file if it exists.

On Fri, 21 Oct 2005 19:11:46 -0700, <John> wrote:

>Hi,
>
>PPC 2005 changed the sequence of calls to setup dll during reinstall.
>Now it is:
>Uninstall_Init
>Uninstall_Exit
>Install_Init
>Install_Exit
>
>My setup.dll does delete some private stuff during uninstall,
>but it must not delete it during re-install.
>
>Question is how to tell one from another?
>
>Thank you
>John
>


-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
The PocketTV Team

2005-10-25, 7:03 pm

> Do the logo requirements allow leaving some sort of temp file (perhaps
> in the folder with all the Pocket IE temp files) during uninstall? If
> so, the uninstall could put settings in a temp file, and the
> (re)install could read the settings from that file if it exists.


in theory, no, but I doubt that the companie that do the validation test
have some tests to check this. they probably only look at the registry and
the application folder in the Program Files folder.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com