I built some optoisolated relay switched outlets a while ago, so I hooked one of them into the RTS line on a USB->RS-232 adapter. You can usually control the handshake lines from software, since they're used to tell the connected device if you're ready to send and/or receive information. I used the `serialport` Ruby gem to control it, super simple and available on most *NIX boxes. Don't know if it works under Windows, I would sorta think it does since the library is cross-platform.