Winamp Multiuser extension (v0.9.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 :-/ 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, 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 :-) To be able to distinguish among files that the user has (and has not) changed, when wamulti is installed, it creates a copy of the current Winamp directory (the so-called "reference" or "backup" directory), which contains the current Winamp settings and which is henceforth used as the "starting point" for all users. All users then "diverge" from this default installation. Every user will have their own private settings, with wamulti nicely keeping them apart from the other users' settings. 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 NT-based computers are the only target platform. You will also need to have an NTFS file system: first, only NTFS provides adequate security, second, some functions of the program only work correctly on NTFS drives (e.g. code that checks for file ownership). 2. Quick Installation ===================== Please use the provided installer/uninstaller to install, update or uninstall wamulti. The installer should, in theory, figure out the wisest (or most probable) choice for you. 3. Questions and Answers ======================== Q: I don't have an NTFS file system, how do I get one? A: Search for "convert ntfs" on microsoft.com Q: What if a malicious user deletes all files? A: 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 (and then be merged with the user's settings, as normal). Q: How do I get back to the default configuration? A: Delete the "winamp" subdirectory in the %APPDATA% path. Q: %APPDATA%?! A: Type "Windows key"+R. (The "windows key" is the one sitting between the "Ctrl" and "Alt" keys on the left side of the keyboard.) In the window that appears, type "cmd" and press enter. Type "echo %APPDATA%" and press enter. Go to this directory, and you'll see a folder called "winamp" which contains your personal settings. Delete it, and you'll use the default settings. Q: How does this work? A: It's actually quite easy. We take advantage of the fact that winamp uses "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: Will it work with fast user switching? A: Depends. If only one user is running winamp, no problem. If at any point in time, two or more users are running winamp at the same time, you'll be in deep trouble. So: no, it definitely won't work. It can't. Sorry. Go hit the Winamp developers :-) Q: How can I check the multiuser code is actually being executed? A: Set the HKLM\Software\Winamp MultiUser\AdministrativeRun setting to 1, or start Winamp with the parameter "/muadmin:1". You should get a warning on startup. Press cancel and set the value back to 0 ("/muadmin:0"). Q: What is the AdministrativeRun setting for? A: See next question :-) Q: How can I change the default (reference) Winamp settings? A: First of all, be sure you have administrator rights. 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 Since version 0.9.0, there is yet another possibility, but it's not half the fun and it takes much longer: You could simply uninstall wamulti, do your changes, then install it again. 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. 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 rename the file and start winamp. Finally, if you're still out of luck, use a debug version of wamulti. Q: What's the difference between the debug and the release version? A: From the point of view of functionality, nothing. Both do the same things. For most people the release version is the recommended way to go. However if you're in some big trouble, and the answers within the readme don't help or don't resolve the problem, it's probably time for installing the debug version. It simply provides more logging at runtime, sort of low-level information that may be useful to track down the source of a problem. Q: How do I install and use the debug version? A: Install it by using the installer and choosing "update (debug version)". In order to see anything useful, you'll need DebugView from sysinternals (fetch it from http://www.sysinternals.com/Utilities/DebugView.html ). Start debugview as an administrator. Start winamp, shut it down, etc. You should see a whole lot of stuff coming from wamulti during startup and shutdown. Try to analyze the logs yourself and make sense of them. If they don't make sense, save them and send them to me :-) 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: Since 0.9.0, the easiest and safest way is probably uninstalling wamulti, updating Winamp, installing wamulti again (don't worry, you won't loose the personal settings on the way). If you prefer the hard way, see the next answer. 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 may 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: Use the Software Control Panel. You can also start wamulti-uninst.exe in the winamp directory by hand. If for whatever reason you just want to temporarily "disable" wamulti, it suffices to rename the msacm32.dll to something different. Q: Will uninstalling wamulti loose users' settings? A: No. Not if they don't explicitly delete them (see a few questions above on that matter). However, while wamulti isn't installed, users will of course not be able to actually use their settings, simply because Winamp doesn't know about them. Once you reinstall wamulti, the settings will again be usable (and used). Q: Why does Winamp not work "correctly" for restricted users after uninstallation of wamulti? A: Because the uninstaller resets the folder's permission to the defaults, meaning that unprivileged users may not write there. Duh. Q: Why? Why don't you leave access enabled for users? A: Because a fresh winamp installation doesn't enable it either, and because it might be a security hole. Q: This behaves weirdly in Windows 2000 when used by multiple users with administrative privileges - WTF? A: I know. This is a limitation in Windows 2000, files created by *any* administrator have their ownership set to the administrators group, not the user himself. Solution: don't have multiple administrators, it's a bad idea anyway. Q: Any other catches/bugs? A: Only one that I could think about, which is probably so rare it won't ever happen. It could in theory be that while winamp itself is installed on an NTFS partition, the user data (%APPDATA%) are on a FAT (or some other) partition which doesn't correctly provide file ownership checks. I don't know what'll happen. If anyone finds out, let me know ;-) Q: How about the source code? A: Source code is provided under the terms of the GNU General Public License. Feel free to modify it - just one little wish: if you add some great functionality, I'd be pleased to know. 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 Aug 30 2005