When I try to re-install/upgrade my application on a WMv5 emulator, my Install_Init function gets called but after it returns I get a message saying:
"The previous version of [app] will be removed before the new one is installed. Select OK to continue or Cancel to quit."
This basically uninstalls my app along with all of its configuration rather re-installing or upgrading on top of what's there.
How can I get the cab installer to re-install rather than uninstall and then install
I am running VS 2005 Beta 2 with emulators.
Thanks.

Re-install/upgrade doesn't work
francisk
How would one prevent portions of the application from being uninstalled For instance, if I have library files that are part of my full application installation but not part of a particular update, how would I use a custom action to prevent the unreplaced pieces from being uninstalled Can this be done in a custom action
I have to say, I prefer the WM5 behavior, but it is going to break a lot of update processes.
BigSquare
That's by design behavior on WM 5.0. If you need to preserve some settings, consider doing so in Install_Init(). This situation can be detected by checking fFirstCall and fPreviouslyInstalled flags which would be set.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
AntProgrammer
>It is particularily annoying because it deletes all the registry keys that were installed with the program as well, so even though I created all these registry settings using the program, they all got deleted because they were in the tree.
Interestingly enough, it only deletes the whole tree, if the installer iteself created the tree as well. I (still) have similar behavior:
I split up my installer into two parts. One that should persist for a longer time (and doesn't need to be updated so often) and an other that may be updated on a regular base.
Both CAB files use the same company name as base for the Registry:
Sample:
Cab 1 Installs the following keys:
Cab 2 Installs the following keys:
If I install Cab 1 first, then Cab 2 second and then remove Cab 1, all Registry keys will be gone, since Cab 1 created "
HKLM\SOFTWARE\ACME" in the first place.I personally think, this is pretty foul, because it means, that I can't create two applications with the same company name as registry base without getting in trouble when uninstalling in the wrong order
Tilman
PS: I think about working around the problem by setting up my registry tree remotely before installing the CAB files, thus making wceload not record the creation of the keys
Aksh_bvn
Say your app name is 'my app'
You have to remove the following key from the device registry
'HKLM/Security/AppInstall/my app'
If you try to re-install the cab after this, the warning will not come up.
I hope someone can enlighten me on the repurcussions of the hack.
Vino.
Brian Lyttle
Unlike desktop's Installer, WCELOAD has no notion of upgrade. Each CAB should be complete with all files. You can do improvised upgrade by creating CAB with different application name (e.g. "My Cool App Update 1" instead of "My Cool App" and doing whatever's needed for upgrade in setup DLL (detecting if original application is installed and can be upgraded, moving files, etc.). Setup DLL is the only "custom action" you could have with CE CABs. It has to be a native DLL, no managed code or scripts.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Ikkentobi
This is an extremely irritating and in fact costly behaviour. My app which was working fine under PPC 2003 now deleted all the data that was in the database when I went to install an upgrade, because the db file is initially installed with the program. Luckily I discovered it after the first install and didn't lose any data, however, it could have been disasterous if the database hadn't had a chance to push all the transactions up to the server before it upgraded.
It is particularily annoying because it deletes all the registry keys that were installed with the program as well, so even though I created all these registry settings using the program, they all got deleted because they were in the tree.
PLEASE change this behaviour or give us more control of the installation functions I.E. an UPDATE Project. The only installation option we have in VS is to create a CAB file and we cannot create any custom processes without writing a native setup.dll.
Thanks
Robert Brown