RunProgramInGuest - wrong/not set StartDateTime

43 views
Skip to first unread message

Markus Kienleitner

unread,
Sep 8, 2014, 4:54:56 AM9/8/14
to vmwar...@googlegroups.com
I recognized after debugging that the returned process of the method runProgramInGuest is not correctly set.

Here you can see that everything is set, except the StartDate: https://github.com/dblock/vmwaretasks/blob/598cef153435d9bfea79bfb53dc1a2c8ff13971f/Source/VMWareLib/VMWareVirtualMachine.cs#L909

Can somebody fix that or i am using the runProgramInGuest method not correctly?

<snip of my code>
            // declare a virtual host
            var virtualHost = new VMWareVirtualHost();

            // connect to a local (VMWare Workstation) virtual machine
            virtualHost.ConnectToVMWareWorkstation();

            //Add machines to virtual Machines List
            var virtualMachine = virtualHost.Open(machine.path);

            virtualMachine.LoginInGuest(machine.username, machine.password, 8, 100);
            machine.VmProcess = virtualMachine.RunProgramInGuest(cmd, arguments, Constants.VIX_RUNPROGRAM_RETURN_IMMEDIATELY, 1);
</snip of my code>

Daniel Doubrovkine

unread,
Sep 8, 2014, 7:22:29 AM9/8/14
to vmwar...@googlegroups.com
Please contribute any fixes, make pull requests. Thanks.


--
You received this message because you are subscribed to the Google Groups "vmwaretasks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmwaretasks...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

dB. | Moscow - Geneva - Seattle - New York
code.dblock.org - @dblockdotorg - artsy.net - github/dblock

James Hurst

unread,
Jan 8, 2015, 3:19:43 AM1/8/15
to vmwar...@googlegroups.com
Question: how do you get access to the Constants in your code? (Constants.VIX_RUNPROGRAM_RETURN_IMMEDIATELY)
I tinkered and found that I get visibility to Constants if I add a reference to Interop.VixCOM, however as soon as I do that - I get a mess of compile errors, including...
"Type 'Vestris.VMWareLib.VMWareVirtualHost' from assembly .. cannot be used across assembly boundaries because a type in its inheritance hierarchy has a generic type parameter that is an embedded interop type."

What am I doing wrong?

Thank you for any guidance,
James Hurst

Daniel Doubrovkine

unread,
Jan 8, 2015, 9:39:55 AM1/8/15
to vmwar...@googlegroups.com
This has been seen before. I am not sure what the conclusion is, but would be nice to figure it out and have some conclusive answer and to update documentation.



--
You received this message because you are subscribed to the Google Groups "vmwaretasks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmwaretasks...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages