You can use vmrun for that kind of thing.
vmrun -T ws -gu guestUser -gp guestPassword runProgramInGuest "c:\my VMs\myVM.vmx" "c:\Program Files\myProgram.exe"
Note that it requires you to have a correctly configured and running VMware Tools in the guest.
vmrun should already be installed for VMware Workstation Professional.
If you are running VMware Workstation Player then you will have to locate, download and install it first.
Wil| Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
| Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
| More info at https://www.vimalin.com
| Twitter @wilva
| VMware Wiki at http://www.vi-toolkit.com