An alternative and reverse idea to the other more "proper" methods of changing a simple text file in the registry.
In my sytem I use revolving sounds , because repetition is not very fun. The method that i change the sounds with is to Rename the wave files to change the sound underneath the system, and the registry stays the same.
Renames are very fast operations, and after years of using such a odd method, I have not had a single problem (one missing file and you can guess what happens).
This is part of what one of the batch files looks like to change each boot, trimmed down to fit as an example.
rename C:\WINDOWS\media\EndSound\000.wav 011.wav
rename C:\WINDOWS\media\EndSound\001.wav 000.wav
rename C:\WINDOWS\media\EndSound\002.wav 001.wav
rename C:\WINDOWS\media\EndSound\003.wav 002.wav
rename C:\WINDOWS\media\EndSound\004.wav 003.wav
rename C:\WINDOWS\media\EndSound\005.wav 004.wav
rename C:\WINDOWS\media\EndSound\006.wav 005.wav
rename C:\WINDOWS\media\EndSound\007.wav 006.wav
rename C:\WINDOWS\media\EndSound\008.wav 007.wav
rename C:\WINDOWS\media\EndSound\009.wav 008.wav
rename C:\WINDOWS\media\EndSound\010.wav 009.wav
rename C:\WINDOWS\media\EndSound\011.wav 010.wav
I use another long batch and the task scheduler, to change the ~10 most repetitive sounds in the system hourly. No "for" loops, as you can see just raw simple renames.
I do not have multiple users, so I can only assume that a simple rename of a file everyone is pointing to would work in your case, and that a Copy or move would not be needed.
It was easier to organise a bunch of consecutive file items (001,002,003), than to work with a bunch of oddly named files even in a registry insert.
Notes:
I have to make copies of the whole media folder, before testing, get it all so it repeats many many times, check test, then I remove the extra backups knowing it is working.
From what I have seen in a regmon, The registry IS polled for the sounds every time, so changing the registry should do the same thing, a reboot or restart of the audio or shell should not be required, like it can be for other registry edits.
The reversing of that , I am trying to demonstrate here. To change the one file that you and the other users point to, instead of changing all the users registry pointers to that file.
It seems like we both entered very similar answers on the very same minute. Remark to the poster: once the registry is updated, there is no need for a startup script, unless to override any changes done by the user during his logon, but he is still free to change them and they will stick until he logs off. But that .bat file will change them for all users once any user logs on - somewhat strange behavior. – harrymc – 2013-08-16T19:55:56.160
Also, this can only work for users having administrator privileges and will cause an elevation dialog if UAC is on. – harrymc – 2013-08-16T20:06:17.423