After reading through this question about the dangers of untrusted usb drives, I was wondering if there was a way to actually see what happens when a usb drive is installed. Is it possible to say run a virtual machine of windows or linux, install the drive, and see a listing of what commands run when it is inserted?
EDIT: It seems that physically the best option is to plug it into a computer I don't care about that is not plugged into a network. What I am more interested in though is how to see what gets executed when the usb gets plugged in. Is there some kind of logging that will show me every command that gets executed when the usb stick is plugged into a windows and/or linux machine. Or is there something like wireshark, but for usb instead of networks?