I have a manually triggered AutoHotKey script that gradually lowers the volume of my laptop when (e.g.) ads are on in Spotify. Sadly, to get it working in Windows 7, it has to run as administrator, and thus requires a UAC prompt, which rather defeats the purpose.
Essentially, you create a non-scheduled task that runs as administrator which runs your program (here a compiled script) and then run that task, rather than the programme.
The AHK script is this (updated to use Vista Audio Control Functions; you need to have VA and Com in the same folder as the script):
master_volume := VA_GetMasterVolume()
min_volume_for_spotify := master_volume * 40 / 100
number_of_steps = 20
vol_step := (master_volume - min_volume_for_spotify) / number_of_steps
if master_volume < 10
MsgBox, Master volume is %master_volume% per cent: %master_volume% - %min_volume_for_spotify% is too low!
VA_SetMasterVolume(master_volume - (vol_step * A_Index))