I doubt it's possible, and if it was you wouldn't want to do it anyway. First of, quite a few I/O ports are used for communication within the computer itself, so if you could disable them all, the computer would quickly quit working. The network adapter normally uses at least a couple, so if you did it, the network would quit working anyway.
There are also (at least potentially) memory mapped peripherals anyway, so it wouldn't necessarily be effective -- other than the minor detail that the computer would almost certainly quit working until it was restarted, at which point the user would swear at you as he removed your software from his machine and vowed to never again use anything you developed.
I don't see it now, but wasn't something about "blatantly offensive" once one of the reasons for voting to close a question? I'm not sure this qualifies, but it seems pretty close...