There is a problem with setting your Bluetooth (BT) speaker as "default sound output" if you're using a USB Bluetooth adapter.
In this case, if you start your PC with your BT speaker powered off, the default device automatically changes back to the system default (not the BT speaker), so you have to 1.) power on your BT speaker; 2.) set the BT speaker as the default device manually; and you have repeat it every time.
I found a solution for this problem. This is a batch file that must be started with Windows (I tested it under Windows 7 and Windows 10). It is constantly trying to set your BT speaker as the default device, and as you turn on your speaker, it stops monitoring and closes itself. It's working with a 3 second pause between checks so it is not slowing down your system noticeably.
First, you have to create a folder and download two freeware utilities into it:
1.: SoundVolumeView by NirSoft:
http://www.nirsoft.net/utils/sound_volume_view.html
2.: NirCmd by NirSoft:
http://www.nirsoft.net/utils/nircmd.html
You need to power on your BT speaker and set it as the default sound output. (Follow john's answer here to get it done.)
Now you have to export your current sound device settings by using this command:
SoundVolumeView.exe /scomma AudioDevices.txt
A text file named AudioDevices.txt is created. Open this file, and search for your BT speaker in its content. Copy that line to the clipboard from its beginning to the ",Render" part. For me, this specific part was this (but it is different for everyone!):
Headphones,Device,Render,Anker SoundCore stereo,Render
Now create a file named set_default_device_cycle.cmd with this content:
@echo off
timeout /t 10
:start
NirCmd setdefaultsounddevice "Headphones" 1
SoundVolumeView /scomma "%temp%\AudioDevices.txt"
>nul find "Headphones,Device,Render,Anker SoundCore stereo,Render" "%temp%\AudioDevices.txt" && (goto end)
cls
echo Waiting for the Bluetooth Speaker to be powered on...
timeout /t 3
goto start
:end
Look at the line that begins with ">nul find". You have to swap the quoted part with the text that you've extracted from your AudioDevices.txt file. Do NOT use the text I've provided as it only works in my environment, 99% chance that your will be different. And check the line starting with "NirCmd setdefaultsounddevice", the text in the quotes (for me it was Headphones) has to be equal with the beginning word of the text that you've extracted from AudioDevices.txt.
Save this file (set_default_device_cycle.cmd) and place it in your Startup folder to make it run every time you load Windows. That's even better to put a shortcut to it in the Startup folder, and in the shortcut's properties set "Run" to "Minimized" to hide it's black window.
This is the best solution I've found thus far but it's by no means ideal. There's still a delay as to when the headphones decide they want to connect however. – MyItchyChin – 2011-02-03T15:23:58.150
I feel like that delay is pretty standard with bluetooth. My bluetooth mouse and keyboard both have a delay in activation after my computer has been off/untouched for a while. – manyxcxi – 2011-02-03T17:16:53.440