Hi David,

Here's what I think happened:

Each time you create an app to be installed, WE creates a file for the app; the 
file has no extension, but is a simple text file in the .ini format.  These 
files are kept in a sub-dir of the WE profile dir named uninstall; they contain 
info about the app, including a list of all its files.

If you can recreate the conditions of having both your original app and your 
newest app installed, so you see two apps showing up in the  "add or remove 
apps" dialog, then go look in the uninstall dir and you should see two files 
there; one named for your older app with the correct app name, and one named 
for the newer (incorrect version).

The problem is when you look at the files list for each of these uninstall 
files (using notepad), you'll see they share many of the same files; evidently 
only the app name was incorrect, not all the file names.  So, if you use WE to 
uninstall either of the apps, it will delete files which are critical to the 
other version.  The only way to fix things using just WE is to uninstall both 
older versions, and then start by installing a third corrected version.

Ok, I have some code which may be of help to you, as I once or twice had to do 
something very similar.  I had a couple of apps whose names had changed.  I 
wanted an update for these older app names, which would install a new app with 
new file names, but then I wanted it to uninstall the older app, removing all 
the older files, removing the uninstall file for the older app (which is what 
makes it show up in the apps list in the "add or remove apps" dialog), and 
finally, removing it from the WE mechanism which made it run (there's one 
mechanism for global apps, and a separate, completely different mechanism, for 
program-specific apps).

I wrote a generalized global app program to do this, which should work with 
only slight modifications, for any app or type of app.  I could send you (or 
anyone) the code for this app.  You include it in the .wepm file with your 
newest app, setting it to be a global app, and at the end of its run it also 
removes itself so it will never run or be seen by the user.  The idea is that 
this program will run the very first time along with your new app, and it will 
do all this clean up behind the scenes, removing the older app of a different 
name, and then removing itself.

If you are to make use of this, you will need to modify it somewhat; in 
particular, you don't want it to go in to the uninstall file of the badly named 
app and run through its file list, deleting all the files (so you'll need to 
remove that part).   Also, since I believe the .vbs file is named correctly in 
your update, you also don't want it to go in and remove it from the mechanism 
which makes global apps run.  Really, you just want it to delete the uninstall 
file for the badly named app.  

So now that I'm thinking about it, you don't need my program at all I don't 
think; just work out the name of the uninstall file for the badly named update, 
and in your 0.70 update, look for this file and delete it.  That seems to me 
like it would fix everything.

I think there's a possibility that your users right now have two copies of the 
extended dictionary running; they're both the newer version, but I'm wondering 
if one is being run under the original app name, and one is being run under the 
new (bad) name?  You should be able to see if this is true by setting yourself 
up to be an average user who has applied your update, and see if in the app 
manager, you see two entries show your file running.  If so, then you will also 
need to remove the entry from the global apps mechanism for the badly named 
update, to stop it from running (and I will need to send you this program I've 
been going on about, so you can see how to do that, it is complex).

*** Disclaimer ***
Everyone reading this should understand I am messing with things which are not 
documented by GW, and so not guaranteed to work as I think they do, and 
certainly not guaranteed to work like this from one version of WE to the next.

I'll send you this program just in case David, but hopefully you won't even 
need it, just delete the uninstall file if you only need to remove the unwanted 
entry in the "add or remove apps" dialog.

Hth,

Chip


-----Original Message-----
From: David [mailto:trailerda...@hotmail.com] 
Sent: Thursday, January 01, 2015 6:07 AM
To: gw-scripting@gwmicro.com
Subject: How to fix a messed up wepm file?

All you experienced developers,
I sure could use a bit of help here. Smile.

OK, it just had to happen. We are all imperfect, and things sometimes 
goes a bit faster than our brain. Smile.

I released a new version of the Extended Dictionary yesterday. Version 
0.69. It is meant as a replacement for 0.68. Users report it installed 
just fine, and everything seems wonderfully well.

Then, this morning one user got in touch with me, and reported that he 
has two entries of the Extended Dictionary, showing up in the Package 
Manager. That is, if you go to WE Controlpanel, and hit Alt-A, 
Right-Arrow, and once Down-Arrow - where it says to Add and Remove apps. 
Hit enter here, and in the list, both version 0.68 and 0.69 will show up.

I had to troubleshoot a bit, and it seems that I made one simple typo, 
in my creating the 0.69 wepm archive. For some reason, the wepm file 
shows up to be named "zExtended Dictionary", whereas it should have been 
named the same as always before: "Extended Dictionary". That little 
extra Z-character that had made its dirty way into the filename, causes 
things to show up as two different entries in the Package manager.

I Thought things now would be as easy as to ask the user to remove the 
old entry of 0.68. But when I tried it myself, the package manager all 
the sudden removes both the entries, and the user looses the app. 
Allright, I thought, now just let him reinstall the package. but then 
the new install will get the wrong wepm filename attached.

Sure, I will upload a fixed version of the wepm file, but is there a way 
for my app to remove the wrongly spelled wepm archive, and thereby 
cleaning up the user's Package Manager? Or, will I have to ask everyone 
who has installed the 0.69 version, to perform some manual steps here, 
to get things cleaned up? If there is an automated way, I would much 
prefer that, so as to have the user as little confused as possible.

For those on the list, who happen to run the package, I do apologize for 
the inconvenience hereby caused. It is all due to my mistyping the 
filename, and I should have made better proofreading prior to the 
upload. I just want to know, if there is an easy fix from here.

For anyone who has a bit of feedback here, thanks for all you can 
provide. And to the AISquared staff, if there is no easy way for my app 
to automatically remove all its "double entries" from the package 
manager, is there a way that such feature could be implemented for later 
cases?

Thanks, and apologies,

-- 
David

Reply via email to