I have a problem with running program using vmwaretasks and C#.
It fails on below command:
virtualMachine.RunProgramInGuest(TestFilePath, InstallArguments, 60*60);
with error:
Test Name: xxx("ProjectTeams/Platon/win8x64en/win8x64en.vmx","OEM","en")
Test FullName: Vestris.VMWareLibSamples.VMWareVirtualHostSamples.xxx("ProjectTeams/Platon/win8x64en/win8x64en.vmx","OEM","en")
Test Source: d:\PerfProjects\Enigma-1.5\ClassLibrary1\ClassLibrary1\Class1.cs : line 32
Test Outcome: Failed
Test Duration: 0:00:22.637
Result Message:
System.Exception : Failed to run program in guest: guestProgramName="C:\TempFolder\xxx 3.2.0.788 Setup.exe" commandLineArgs="/debuglogC:\TempFolder\InstallLog.txt /s /v/qn"
----> Vestris.VMWareLib.VMWareException : A program could not run on the guest operating system
Result StackTrace:
at Vestris.VMWareLib.VMWareVirtualMachine.RunProgramInGuest(String guestProgramName, String commandLineArgs, Int32 options, Int32 timeoutInSeconds)
at Vestris.VMWareLib.VMWareVirtualMachine.RunProgramInGuest(String guestProgramName, String commandLineArgs, Int32 timeoutInSeconds)
at Vestris.VMWareLibSamples.VMWareVirtualHostSamples.RunTestApplicationInGuest(VMWareVirtualMachine virtualMachine, String TestFilePath) in d:\PerfProjects\Enigma-1.5\ClassLibrary1\ClassLibrary1\Class1.cs:line 128
at Vestris.VMWareLibSamples.VMWareVirtualHostSamples.xxxx(String VMPath, String SnapshotName, String LANG) in d:\PerfProjects\Enigma-1.5\ClassLibrary1\ClassLibrary1\Class1.cs:line 96
--VMWareException
at Vestris.VMWareLib.VMWareInterop.Check(UInt64 errCode)
at Vestris.VMWareLib.VMWareJob.Wait[T](Object[] properties)
at Vestris.VMWareLib.VMWareVirtualMachine.RunProgramInGuest(String guestProgramName, String commandLineArgs, Int32 options, Int32 timeoutInSeconds)
I have found out that when I have created user on guest with the same name as my local user(where visial studio is installed) then the same code runs as expected. But when I am trying to use guest account with different username as my local user, that it fails with above exception.
UAC and Firewall is turned of for both(same and different name) users.
This is my login command:
virtualMachine.LoginInGuest(UserId, Password, Interop.VixCOM.Constants.VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT,30);
Do you have any answer why this is happening? Is there any workaround for this issue? Please help