When you type in the startup command for either game (WC or WC2) add a space then type Origin -k Make sure you use a capital 'O' or the cheat won't work. You'll be able to fly against wave after wave of Kilrathi without taking damage, and destroy any targeted ship (including the big capital ships!) at will by pressing CTRL and DEL at the same time.
Wing Commander III is similar. You use the command line wc3 -mitchell and then while in combat CTRL-W will kill a locked on enemy, and CTRL-ALT-W will destroy all enemies in the radar map.
For Wing IV, use the command line wc4 -chicken. These controls should work: CTRL+W to destroy targeted enemy, CTRL+ALT+W to destroy all enemies on radar, and ALT+O to become invulnerable.