When working with ESX 4.1 there are two different routes I can think of:
Finally be aware of the fact that in ESXi 5 VIX API has been depreceated and equivalents have been established in the vSphere API through Managed objects GuestAuthManager, GuestFileManager, GuestOperationsManager, and GuestProcessManager which you can find here.
Hope this helps ...
Thanks Thomas for your very useful info. The reason that I can't use SSH is I am trying to implement a piece of code to simulate typing in Console.
Commands that I want to run can not be run from outside SSH sessions (only can be initiated from Console).
I will see if I can upgrade our servers to 5 so I can use the API you mentioned (Do you know by any chance a sample code somewhere?)
Take a look at my blog article here http://www.virtuallyghetto.com/2011/07/automating-new-integrated-vixguest.html which has a complete working sample script for the new Guest Operations using the vSphere API via vSphere SDK for Perl.