Scripts get overwritten on update

Beta Testing for Windows Products and plugins

Moderator: Gurus

gtbuzz
Posts: 129
Joined: Mon Jul 18, 2005 11:09 am

Scripts get overwritten on update

Post by gtbuzz »

I modified my Case.vbs to have a few extra words to lowercase (by|on) and to uppercase (EP), but these changes seem to have gotten overwritten when I installed Alpha 3.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

If (and I don't know) Alpha 3 contains a script called Case.vbs then it will have been overwritten with the included script. Best either rename your script as something different (ie: MyCase.vbs) and use that instead, or keep a backup to copy over the top after upgrade (as future versions will probably contain the script too).
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
gtbuzz
Posts: 129
Joined: Mon Jul 18, 2005 11:09 am

Post by gtbuzz »

Case.vbs is the "Case Checker" script that is included in the 2.5 alphas. The problem with renaming it, is that I will have 2 entries in the scripts list, which is just stupid. The script isn't being updated every time, it's the same version getting rewritten. Why not just check if the file is already there? If it is then don't do anything, else add it.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Because then if a new version of the script was released with the next version of MM, no one would get it.

My previous post will at least work as a workaround until a better solution is suggested.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
gtbuzz
Posts: 129
Joined: Mon Jul 18, 2005 11:09 am

Post by gtbuzz »

I guess it is just how you look at it then. I think of scripts as more dynamic code that can be touched by the end user to reach specific needs. Though scripts (and Case.vbs specifically) often have version numbers in the comments, script versions seems like overkill to me. Scripts will change independently of the MM anyways. Therefore you would need some sort of system like Firefox's extension manager to keep track if you are going to go the versioning route. All that seems like overkill to simply include a couple of convience scripts with the default install.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

In my mind it would be better not to include any at all with the install, and let people find what they want on the forums. However, in your current situation I advice you make the changes again and then backup your script before installing the beta.

In fact, this is probably what the installer should do. Backup any files before overwriting them. Save "Case.vbs" as "Case.vbs.bak" and then write the installer version as "Case.vbs". This give users the new version, but allow them to revert to the old version if they prefer.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply