Doing a Super Search would have turned up this exact discussion recently -
Hiding the DOS window on Win32
The code from the Cookbook was posted in reply to this question here -
(Guildenstern) Re: Hiding the DOS window on Win32GuildensternNegaterd character class uber alles!