View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004912||MediaMonkey (current)||Framework: Scripts/Extensions||public||2008-11-04 16:11||2010-11-22 13:57|
|Target Version||Fixed in Version||4.0|
|Summary||0004912: Non-Admin users can't install scripts|
|Description||In 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.
|Fixed in build||1300|
|related to||0004911||closed||petr||Paths in COM interface|
|related to||0005072||closed||Ludek||Pre-test for Admin (warning for add-ons installation)|
|parent of||0003726||resolved||Ludek||Extensions should be global for all users|
|related to||0003702||closed||Ludek||Extensions: Cleanup/Support for non-Admin installation of plugins|
|related to||0005826||closed||petr||Installer not working correctly on Windows 7 x64|
|related to||0006710||closed||Ludek||Non-Admin users can't install plugins|
|related to||0009071||assigned||Ludek||SDB.ScriptsIniFile dosn't return correct path when used in Uninstall.vbs|
|related to||0009094||closed||peke||UAC elevation doesn't work on Windows 7 x64 system|
||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).|
||After the fix there should be probably reverted 0005072 ?|
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.
As reported here:
it is problem for Win XP too.´
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)
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.
|Why are not extentions.ini in the scripts folder (like scripts.ini) ?|
||Scripts folder have same permitions as Parent folder and parent folder is Program Files that needs Admin Access.|
||As discussed over phone, Ludek will review the modifications needed to move everything to user's folders.|
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:
in order to access Scripts.ini file during installation.
This needs to be modified to:
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)
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:
and everything is written here during the installation.
I modified/added some methods:
-> this returns path based on running script now
C:\Documents and Settings\<user>\Application Data\MediaMonkey\Scripts\
-> C:\Documents and Settings\<user>\Application Data\MediaMonkey\Scripts\
-> C:\Program Files\MediaMonkey\Scripts\
-> e.g. C:\Documents and Settings\<user>\Application Data\MediaMonkey\Scripts\Auto\Lyricator.vbs
-> this returns path based on running script now
C:\Documents and Settings\<user>\Application Data\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.
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...
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.
||Help has been updated for 22.214.171.1242 to indicate the need to run as admin. Leaving to_doc tag to track required doc changes for 4.0.|
||Is ISDBApplication::CurrentScriptPath = ISDBScriptControl::ScriptPath and should we modify scripts which have ISDBScriptControl::ScriptPath?|
||Yes, ISDBApplication::CurrentScriptPath = ISDBScriptControl::ScriptPath and you shouldn't need to modify scripts which have ISDBScriptControl::ScriptPath|