Winamp Multiuser extension (v0.7.1) =================================== CONTENTS: --------- 1. What is this? Who needs this? Who doesn't? 2. Quick Installation 3. Questions and Answers 1. What is this? Who needs this? Who doesn't? ============================================= Well, this is exactly what its name says: it's a tool to allow _real_ separation of user profiles, which is an essential issue on all multi- user systems. It is basically my try to compensate for that huge weakness of Winamp -- seems like the Winamp developers all have their own single-user PCs :-/ Nah, I mean, it's REALLY annoying, and being an administrator two issues drove me up the wall: - there is no separation of user profiles - all settings go into the same directory. - there is no security at all. For this program to be usable, you basically have to give everyone full access. The bad news first: although I would have loved to (and I tried hard...), I haven't figured out how to overcome that second issue. That means that you'll still have to give everyone full access to the Winamp directory. But read on :-) The program basically does two things: when Winamp starts up, it loads its configuration from the user's home directory. When Winamp shuts down, it saves its profile to the user's home directory. As simple as that. All this is completely transparent to the user, so your users probably won't even notice it -- well, except that they might be surprised because they don't see other's bookmarks anymore :-) So, by now you should probably have guessed whether this will be of any use for you. It is definitely targeted at multi-user systems, so it won't make sense to install the software if you're the only user on your computer. The software was written on XP and tested on XP and 2000, so I'm not sure if it will even run properly on a Win98 Computer. It is also highly recommended to have an NTFS file system (in contrast to the old FAT file systems) - first, only NTFS provides adequate security, second, some functions of the program may only work correctly on NTFS drives (e.g. the code that checks for file ownership will probably not be of any use on FAT partitions). 2. Quick Installation ===================== For information about upgrading an older version of wamulti, please see upgrade.txt. 0) (recommended) Install a fresh version of Winamp, start Winamp and configure it with the "default" settings. These settings will then apply to all users that don't have their own settings yet. 1) Copy the file msacm32.dll to your winamp directory. 2) Make a complete copy of the Winamp directory. For example, copy the whole "C:\Program Files\Winamp" directory to "C:\Program Files\Winamp Reference". The reference directory MUST NOT be a subdirectory of the original Winamp directory. Other than that, you can place it wherever you want. 3) edit the install.reg file to suit your installation and import it into the registry. Actually, the only thing to change is the name of the directories, change them to reflect your installation (for example, if you have a german Windows installation, you will probably want to replace occurences of "Program Files" to "Programme"). To import the settings into the registry, double-click on install.reg. 4) The following applies only if you have an NTFS file system. FAT32 file systems do not provide support for file permissions, so everyone always has full rights. (BTW, you really should have an NTFS file system!) Give "nearly full" access to the Winamp folder to all users. "Nearly full" means everything except delete folder, change owner and change properties rights. Additionaly, give "read and execute" rights to winamp.exe, msacm32.dll and winampa.exe. You will have to override inherited preferences for these, so just do that. Give "read only" access to the "Winamp reference" folder you created. You can use the script provided in the setacl.zip file (available as a separate download) to do this in an automated way. Unzip the files to a temporary directory and run the setacl.bat. This is particularly useful to users of XP Home edition, because they have no means to change the file permissions in an easy way. It's also useful for unexperienced (or lazy ;-)) administrators. You can delete the setacl files after this step. 5) Relax. If you didn't make any mistakes (that means: if you put correct information in the registry), whenever a user starts Winamp, she'll automatically use her profile. Try it! After you close winamp, you should have a "Winamp" entry in your application data directory (type "echo %APPDATA%" in a command prompt to see which directory is used). 3. Questions and Answers ======================== Q: Will this work with Winamp agent, too? A: Yes. Winamp agent doesn't write any files, so it's ok. Q: What if a malicious user deletes all files? A: If you set the access rights as described above, nothing bad can happen. The user won't be able to delete the vital files, thus if winamp.exe is started, the complete configuration will be restored from the backup directory. Q: How do I get back to the default configuration? A: Delete the "winamp" subdirectory in the %APPDATA% path. Q: How does this work? A: It's actually quite easy. We take advantage of the fact that winamp uses the "msacm32.dll" here. When winamp starts up, it searches for the dll in the current directory, then in the system directory. If the DLL is found in the current directory, it will be used. So basically, we give it this DLL, which in turn loads the real DLL (and will forward all "real" ACM calls to that file). But additionally, the DLL does 2 more things: when it is loaded, it restores the user's configuration in the winamp dir, when it is unloaded, it saves the user's configuration to his home directory. In short, this is how it works. On startup: - re-create the reference configuration from the reference directory - merge files from the user's home directory - start winamp as normal On shutdown - winamp will be "shut down" by the time our code gets executed - re-create the reference configuration, save any changes to the user's directory Q: How can I check the multiuser code is actually being executed? A: Set the HKLM\Software\Winamp MultiUser\AdministrativeRun setting to 1. You should get a warning on startup. Press cancel and set the value back to 0. Q: What is the AdministrativeRun setting for? A: See next question :-) Q: How can I change the default (reference) Winamp settings? A: Set HKLM\Software\Winamp MultiUser\AdministrativeRun to 1. Start Winamp, telling the program to restore the reference settings. Then do whatever you want with Winamp (you may close and restart Winamp as often as you want). Just remember that on the first run you should copy the reference directory to the main directory, and after you're done, commit your changes back to the reference directory. Finally, set the AdministrativeRun value back to 0 to restore normal Multiuser operation. Since version 0.8.0, there is an easier way to set the AdministrativeRun setting: start winamp with the command-line parameter "/muadmin:x" (with x being 0 or 1), e.g.: C:\Program Files\Winamp\winamp.exe /muadmin:1 to enable administrative mode C:\Program Files\Winamp\winamp.exe /muadmin:0 to disable administrative mode For all these steps, make sure you have the proper rights (i.e., Administrator rights) Q: Something doesn't work. What should I do? A: Check the values in the registry at HKLM\Software\Winamp\MultiUser. Do the values point to the right directories? Check file access rights to the winamp and reference folder. Are they as described above? Check if the file msacm32.dll exists in your system directory (usually C:\WINDOWS\system32 or C:\WINNT\system32). If it is not there, try searching for it and copying it there. DO NOT however copy the file provided here, otherwise you'd create endless loops and bad errors. If something still doesn't work, well, make sure that winamp works properly without the msacm32.dll installed - just delete the file and start winamp. Q: What if I changed my plugin directory to lie outside the winamp folder? A: Well, this is your problem :-) Any files outside the winamp folder are not scanned. However the setting where the plugin files are is inside your profile, so the setting itself is saved. Q: How do I go about updating Winamp to a new version? A: The procedure may seem a little tricky, but as far as I know it works well. 1. start winamp in administrative mode (e.g., "winamp /muadmin:1"), telling it to copy the reference directory to the main dir. 2. close winamp, not copying back changes. These two steps make sure you're actually working on the reference copy. 3. upgrade winamp, set everything as you please. During the update process, winamp will be started by the installer program. *** DO NOT *** restore the reference settings at this point! When you close Winamp, *** DO *** commit the reference settings. 3a. (in case the installer did not start Winamp automatically): start it once, following the steps in 3. 4. disable administrative mode. (e.g. "winamp /muadmin:0"). 5. Voilą - you're done. Q: How do I uninstall wamulti? A: Delete msacm32.dll. Delete the settings from the registry (see install.reg for exact locations). If you want a really clean uninstall, delete the "winamp reference" directory, and delete the local settings for the users. Q: How about the source code? A: Source code is provided. Do whatever you want with it. If you add some great functionality, I'd be pleased to get some feedback. Q: I have another question that is not answered here! A: Please check http://forums.winamp.com/showthread.php?threadid=188497 If you're still out of luck, contact me by mail. The latest version of this package can always be found at http://members.rosenkeller.org/~christoph/winamp/wamulti/ Don't hesitate to contact me if you have any questions or comments :-) If you have trouble with something, please provide *detailed* instructions how to reproduce. Christoph Langguth 02/04/2005