The first and most obvious solution for this unlikely, yet possible, and annoying scenario is to use the spare key. Mine was at home, 200 miles (320 km) away from where I was, but for those who are not that unlucky, taking a cab home or having a friend bring you the spare can solve the problem.
If you are a member of a roadside assistance program, give them a call. They can send a team of professionals that should have the right tools to help you without breaking the window - it worked for me.
This is only possible with certain cars; employing this method on others could damage the door’s mechanism and, in those cases, a new window is a cheaper solution.
The technician who got me out of this situation assured me that he could help without destroying anything, thanks to the plastic trims on the door pillars of my ancient car.
He then proceeded to stick two plastic wedges between the door and plastic trim, creating enough space for the deflated air bladder, which he then filled with enough air to make room for the long metal rod.
In my case, the car was still running, so it was easy to push the window button with the rod, but he explained that he can unlock several types of cars even if they are not running, as long as the keys are still in the ignition.
Sadly, there might be cases where you will just have to break one of the windows. You can call the emergency number in your area and ask for assistance, or you can attempt to do so yourself.
The easiest way is to use a sharp metal object. If you are not in an isolated area, ask someone for a claw hammer or improvise using the metal pegs from a headrest.
If your car has one, you might be tempted to break the quarter glass window, thinking that is cheaper, but in most cases, it’s not.
Side windows are usually more likely to break than the smaller quarters, so repair shops have a wide range of aftermarket options to choose from as opposed to the quarter glass, which may only be available as an expensive OEM replacement.
When you are finally ready, hit the edge of the glass until it brakes. That is its weakest point, and the whole thing will eventually shatter.
Clear the debris carefully and have the window replaced as soon as possible.