View Issue Details

IDProjectCategoryView StatusLast Update
0004912MMW v4Framework: Scripts/Extensionspublic2022-04-29 01:15
Reporterpetr Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version4.0 
Summary0004912: Non-Admin users can't install scripts
DescriptionIn Vista and Windows 7 , only Admins and Power users have enough rights in Program Files so installing of skins/scripts/extensions can fail because of missing write rights.
For this reason we should move some folders (where user can install custom MMIP packages or store settings, like Equalizer folder) into location, where non-admin users will have enough rights to write files.

Because of complexity of this issue (backward compatibility), we'll make it post 3.1.
Additional Informationhttp://www.mediamonkey.com/support/staff/index.php?_m=tickets&_a=viewticket&ticketid=2673
Tagstodoc-help
Fixed in build1300

Relationships

related to 0004911 closedpetr Paths in COM interface 
related to 0005072 closedLudek Pre-test for Admin (warning for add-ons installation) 
parent of 0003726 resolvedLudek Extensions should be global for all users 
related to 0003702 closedLudek Extensions: Cleanup/Support for non-Admin installation of plugins 
related to 0005826 closedpetr Installer not working correctly on Windows 7 x64 
related to 0006710 closedLudek Non-Admin users can't install plugins 
related to 0009071 assignedLudek SDB.ScriptsIniFile dosn't return correct path when used in Uninstall.vbs 
related to 0009094 closedpeke UAC elevation doesn't work on Windows 7 x64 system 

Activities

petr

2008-11-04 16:12

developer   ~0014859

As Peke mentioned, we should not use "All Users\AppData\" folder for that (see http://lists.runrev.com/pipermail/use-revolution/2007-February/094217.html).

Ludek

2009-01-15 13:51

developer   ~0016236

After the fix there should be probably reverted 0005072 ?

jiri

2009-01-15 14:57

administrator   ~0016237

We really should implement this after 3.1 release. I think that we could support both all users and current user installations:
1. Current user installation would always work and would install files into Local user folder.
2. All users would install files to Program files\MediaMonkey (i.e. as MM <=3.1), would certainly require admin rights and would work for all users.

Ludek

2009-01-26 21:30

developer   ~0016393

As reported here:
http://www.mediamonkey.com/forum/viewtopic.php?f=6&t=35988 [^]
it is problem for Win XP too.ยด

i.e.
I've noted that on XP, extension installation info is written to
C:\Documents and Settings\All Users\Application Data\MediaMonkey\Extensions.ini
which I suppose does not work unless you're admin on the machine.

We should select one of these items:
a) change the path to C:\Documents and Settings\<User>\Application Data\MediaMonkey\Extensions.ini
b) change the path to C:\Program Files\MediaMonkey\Extensions.ini
c) give user the same warning as for Vista (0005072)

Ludek

2009-01-26 21:36

developer   ~0016395

Last edited: 2009-01-26 21:38

I have used c) in build 1219, but I guess that we could use a) for XP in MM 3.1, I tested that a) (change the 'All User' to '<User>') works fine and allow users to install scripts on XP.

Teknojunky

2009-01-27 19:36

updater   ~0016413

Why are not extentions.ini in the scripts folder (like scripts.ini) ?

peke

2009-06-11 23:42

developer   ~0018382

Scripts folder have same permitions as Parent folder and parent folder is Program Files that needs Admin Access.

jiri

2009-06-23 09:53

administrator   ~0018482

As discussed over phone, Ludek will review the modifications needed to move everything to user's folders.

Ludek

2009-07-20 19:27

developer   ~0018575

Last edited: 2009-08-04 22:32

Added option to install extensions to the current user's folder, added new skins and scripts directory for current user only and solved several problems related to this addition.

Nevertheless some problems haven't been solved yet and maybe rather aren't solvable without modifications of scripts themselves.

e.g. Most of scripts uses paths like:
SDB.ApplicationPath&"Scripts\Scripts.ini"
in order to access Scripts.ini file during installation.
This needs to be modified to:
SDB.ScriptsIniFile
because Scripts.ini is now stored in two separate locations (one location is common for all users and the second is accessible for current user only)

Ludek

2009-08-05 11:00

developer   ~0018613

Last edited: 2009-08-05 11:06

I finished the implementation and all necessary changes.
If user tick the
'[x] Install for the current user only (doesn't require admin rights)'
checkbox during installation of an extension then everything is stored to
C:\Documents and Settings\<user>\Application Data\MediaMonkey\
where are created all necessary dirs:
[Extensions]
[Scripts]
[Scripts\Auto\]
[Scripts\Scripts.ini]
[Skins]
Extensions.ini

and everything is written here during the installation.

I modified/added some methods:

SDBApplication::ScriptsPath
-> this returns path based on running script now
C:\Documents and Settings\<user>\Application Data\MediaMonkey\Scripts\
or
C:\Program Files\MediaMonkey\Scripts\

SDBApplication::LocalScriptsPath
-> C:\Documents and Settings\<user>\Application Data\MediaMonkey\Scripts\

SDBApplication::GlobalScriptsPath
-> C:\Program Files\MediaMonkey\Scripts\

SDBApplication::CurrentScriptPath
-> e.g. C:\Documents and Settings\<user>\Application Data\MediaMonkey\Scripts\Auto\Lyricator.vbs

SDBApplication::ScriptsIniFile
-> this returns path based on running script now
C:\Documents and Settings\<user>\Application Data\MediaMonkey\Scripts\Scripts.ini
or
C:\Program Files\MediaMonkey\Scripts\Scripts.ini


I tested it on several scripts and skins (MagicNodes, Lyricator, SQLViewer) and everything seems to work fine, but the scripts needs to be modified slightly because
e.g. SDBApplication::ApplicationPath & "Scripts\" needs to be replaced by SDBApplication::ScriptsPath
and e.g. SDBApplication::ApplicationPath & "Scripts\Scripts.ini" needs to be replaced by SDBApplication::ScriptsIniFile

Added in build 1300.

jiri

2009-08-06 07:32

administrator   ~0018617

Just to clarify
[x] Install for the current user only (doesn't require admin rights)
is ticked by default, right?

Please document the methods in Wiki (with 'Introduced in MM 4.0' statement), or maybe only tag this issue with 'todoc' in order to do so later.

As for access to Scripts\Scripts.ini, can't we just redirect it to the new location? We can discuss over IM...

Ludek

2009-08-24 13:36

developer   ~0018678

Last edited: 2009-08-24 13:38

Remaining problems have been discussed with Jiri and have been resolved. Nevertheless some scripts like Lyricator or MagicNodes needs to be slightly modified.

As discussed the '[x] Install for the current user only (doesn't require admin rights)' is ticked by default so that it forces scripters to modify the scripts during MM 4.0 beta testing cycle.

Added todoc tag in order to document the new scripting methods in Wiki.

rusty

2009-10-08 16:45

administrator   ~0019103

Help has been updated for 3.1.2.1272 to indicate the need to run as admin. Leaving to_doc tag to track required doc changes for 4.0.

peke

2010-10-25 22:31

developer   ~0020983

Verified 1318

zvezdan

2010-11-22 13:10

updater   ~0021407

Is ISDBApplication::CurrentScriptPath = ISDBScriptControl::ScriptPath and should we modify scripts which have ISDBScriptControl::ScriptPath?

Ludek

2010-11-22 13:56

developer   ~0021409

Yes, ISDBApplication::CurrentScriptPath = ISDBScriptControl::ScriptPath and you shouldn't need to modify scripts which have ISDBScriptControl::ScriptPath