View Issue Details

IDProjectCategoryView StatusLast Update
0007613MMW v4Framework: Scripts/Extensionspublic2011-06-03 00:16
ReporterLudek Assigned To 
PriorityimmediateSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version4.0 
Target Version4.0Fixed in Version4.0 
Summary0007613: Problems when one script is installed twice (in both user locations)
DescriptionThe idea here is that users should be able to install a script to both locations, but MM is loading only the "for current user only" installation (the "All users" script is ignored) if both exist.
Nevertheless there are situations when it doesn't work:


Start MM as admin, install (say) version 2.0 of a script: (e.g. http://psykar.com/script-files/LastFmImport-2.0.mmip)
Quit MM
Start MM as normal user (no admin), install version 2.1 of a script: (http://psykar.com/script-files/LastFmImport-2.1.mmip)

The 2.1 install does not overwrite the option in the scripts menu (tools -> scripts) and attempting to run my script after following the above instructions will only run the OLD version, 2.0


 
Additional Informationhttp://www.mediamonkey.com/forum/viewtopic.php?uid=7319&f=6&t=56788&start=0
TagsNo tags attached.
Attached Files
TestScript.mmip (1,157 bytes)
Fixed in build1379

Relationships

related to 0007846 closedLudek Cannot install last.fm extension 1.0.0.25 
related to 0007844 closedLudek Scripts that uses Toolbar is listed as 'TBStandard' instead of 'Standard' 
related to 0007540 closedpeke UI responsiveness in MM4 
related to 0009034 closedLudek Scripts of type 0-1 are not correctly displayed in hotkey's Action list if some installed for current user 

Activities

Ludek

2011-03-30 13:16

developer   ~0023975

Fixed in build 1359.

Ludek

2011-03-30 13:29

developer   ~0023976

In addition it is confusing for an end user to see two versions of the same script in the extensions menu - perhaps an indicator if it's installed per user or for all users would be helpful as a minimum.

=>
Add new column called "Installed for"
["Current user", "All users"]

Ludek

2011-03-31 01:27

developer   ~0023985

+ Fixed some others problems and regressions related to script installation/update

peke

2011-05-14 02:03

developer   ~0025213

Verified 1374

peke

2011-05-18 22:45

developer   ~0025457

Last edited: 2011-05-18 22:48

Reopen it looks taht make problems with last.fm plugin also 0007846 If Plugin ID from Install INI is same and apron next Installation of same plugin previous selection should be used as that installation is actually UPDATE of existing plugin and new plugin installation.

Ludek

2011-05-18 23:39

developer   ~0025463

Last edited: 2011-05-19 12:29

Could you be more specific, what you think by "apron next Installation of same plugin previous selection should be used as that installation is actually UPDATE of existing plugin and new plugin installation" ?

If you install Last.FM scrobbler for current user only then _all_ files should be used only from the user's location and _no_ file should be needed from the MM install folder.

i.e. I guess that your plugin requires a file from the global location although it should require the same file from the user location, or did you find a bug in MM? Any steps to reproduce?

Ludek

2011-05-20 21:10

developer   ~0025538

As discussed over IM, if an admin user installed v1 of a plugin then a non-admin user cannot uninstall it, but can install v2 for himself. This is correct behaviour. No need to change.

peke

2011-05-20 23:15

developer   ~0025541

As discussed over IM with Ludek, current behavior as designed can cause possible data loss and scripting errors when allowed to be installed twice (I supplied simple Test Script).

How to use test Script in replicating issue:
1. Install script For all users (Start MM as Admin If Needed)
2. Restart MM (Use /nosplash to ensure that all msgs are visible) MSG will popup that Script is functioning correctly
3. Install script for user only
4. Restart MM (Use /nosplash to ensure that all msgs are visible) MSG will popup that Script is functioning correctly
5. Uninstall Script which is installed for user Only
6. Restart MM (Use /nosplash to ensure that all msgs are visible) MSG will popup that Script corrupted and that ini values are missing

Only way to resolve this is to install plugin again.

NOTE: This is simple example and corruptions are more severe on more complex scripts

Unlike original design (as we thought then) more logically would be disallow installing same Script as User if Script is already installed globally.

There is few issues that would make MM check for availability:
1. If Script is already installed then set initial install dialog to previous script installation setting (Global or User) and do not allow change of install type and thus installing second copy of plugin (MM can easily check using script/plugin ID in both Global and User installed Extension folder to determine what setting was used in previous plugin install

2. Leave it as is but in case that Install type is changed (eg. Global -> User and User -> Global) first uninstall existing plugin (if possible due the access rights, if not abort installation)

3. Apron MM startup check if MM is started in Elevated mode and accordingly allow changing Install type Setting (Selection is only available in case Mm is started as Admin where again point 2. should be applied before install.

4. Extensions Dialog should Show scripts/plugins that user do not have access to uninstall should be grayed and on Mouse Over popup info that management of that script you will need Full Admin Access (2. and 3. of 0007846 ) much user friendlier and directly show user what can be manipulated with current access rights.

jiri

2011-05-21 07:11

administrator   ~0025545

Ludek, in order to avoid any problem, could we rather force user to install script globally (or uninstall it first) in case user is trying to install this script for the current user and its already installed globally?

In such a case (i.e. installing an update of a script), the '[ ] Install for the current user...' checkbox would be disabled and ticked according to installation of the previous version (locally or globally). If implemented this way, there wouldn't be need for any new string.

I can see only possible problem if user installs scripts for the user A and then installs it globally while logged in as user B. MM won't detect this situation and so user A will have both versions installed. However, it probably isn't a big issue.

Ludek

2011-05-23 12:38

developer   ~0025571

Fixed in build 1379.

peke

2011-06-03 00:16

developer   ~0025885

Verified 1382