I know that your original question was to Tenderfoot but it sounds to me like a learned fear behavior mixed in with barrier frustration.
Barrier frustration develops when dogs are able to see people or other dogs move steadily in front of them and are unable to interact except by working themselves up through barking. Dogs are uncomfortable with direct fast movement or approach (i.e. a person walking briskly by with their dog) as polite canine body language dictates slow arcing movements with a series of stops and calming signals.
The dog perceives this pair as a threat and begins to alert. They, of course, keep moving by and out of the dog's sight. The dog learns "those folks were scary but I told them to leave and they went away" and this creates a vicious cycle of the dog becoming more and more worked up by seeing people through the window.
This then, understandably, magnifies when those people don't just pass by but actually make it into the house. Using aversive devices will only compound the problem by increasing the fear reaction. Punishing the behavior yourself will similarly have no bearing on your dog's emotional response and any "improvement" will only occur in your presence. The dog will quickly learn that it is only a bad idea when you're around as barking is a self-reinforcing behavior.
Your dog has learned to fear people through the window and strangers entering the house, if you can change their emotional response to these stimuli you will stop the barking.
People at the window:
Start by putting blocking out the windows where the dog can see out. This will help with the stress level and give you full control over what the dog will see. Using rewards, create mock scenarios where you have a friend or family member (one that the dog does not react to) walk slowly by a window and reinforce the non-reaction. *point of note* many small dogs have fairly poor distance eyesight. If your pup is still reacting in this scenario you may have to start by working even closer to the person, maybe even outside, so that they are recognizable.
Work up gradually. Add speed, funny costumes, multiple people, anything to build the complexity. If your dog starts reacting you have gone too far too fast and need to step back a bit.
This isn't perfectly analogous but here is a video on fear barking to sound. The principles are the same.
People in the house:
Many of the same ideas apply. Start by having family members come in and out, or even knock at the door from the inside. You want the dog to have no reaction. I know it seems a bit silly to reward them for something like a knock inside the door by someone they know, but you are conditioning them to have positive feelings towards every aspect of a guest's visit. The idea is that you will gradually build with more casual friends or costumes so that the dog is always comfortable. They will learn that strangers mean good things and that they don't need to protect you or themselves when people come over.
The other thing I would suggest would be to give your dog a job when someone comes in the door. A place command is very useful, as it is an activity that is incompatible with approaching the new arrival.
Again, take it in small steps
Think of it like getting over a phobia. If you were afraid of spiders would you rather:
work on it by touching a rubber one for a few weeks to gradually building to the real thing
have someone throw you in a tub of them so you could scream it out.
(and do you think that if someone kept throwing you in and telling you to "trust them, you'll be ok" that you would feel any differently about spiders?)
You want to set your pup up for success so until they are much less reactive I would suggest working on crating and take them upstairs (in advance) in a quiet room whenever you have guests.