<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What is parameter should I write about StartProgramInGuest related? in vSphere Guest SDK Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/What-is-parameter-should-I-write-about-StartProgramInGuest/m-p/2825102#M503</link>
    <description>&lt;P&gt;I would like to run program in guest OS.&lt;/P&gt;&lt;P&gt;Version: vSphere web service SDK 7.0&lt;/P&gt;&lt;P&gt;Language: C#&lt;/P&gt;&lt;P&gt;I do not know how to new a instance to invoke StartProgramInGuest. Could someone help me? I would appreicate you very much.&lt;/P&gt;&lt;P&gt;My program will have an error when executed to line "var vimPortType = new VimPortTypeClient("&lt;FONT color="#FF0000"&gt;StartInGuest&lt;/FONT&gt;", @"&lt;FONT color="#FF0000"&gt;https://localhost/sdk/vimService&lt;/FONT&gt;");"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code ##############################################################&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using Vim25Api;&lt;/P&gt;&lt;P&gt;other code ...&lt;/P&gt;&lt;P&gt;public static void StartInGuest()&lt;BR /&gt;{&lt;BR /&gt;ManagedObjectReference processMgr = new ManagedObjectReference();&lt;BR /&gt;processMgr.type = "GuestProcessManager";&lt;BR /&gt;processMgr.Value = "ha-guest-operations-process-manager";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NamePasswordAuthentication auth = new NamePasswordAuthentication();&lt;BR /&gt;auth.username = "zzz";&lt;BR /&gt;auth.password = "123";&lt;BR /&gt;auth.interactiveSession = true;&lt;/P&gt;&lt;P&gt;GuestProgramSpec progSpec = new GuestProgramSpec();&lt;BR /&gt;progSpec.programPath = "C:\\WINDOWS\\NOTEPAD.EXE";&lt;BR /&gt;progSpec.arguments = "";&lt;/P&gt;&lt;P&gt;var vmRef = new ManagedObjectReference { type = "VirtualMachine", Value = "vm-192" };&lt;/P&gt;&lt;P&gt;VirtualMachineGuestQuiesceSpec virtualMachineGuestQuiesceSpec = new VirtualMachineGuestQuiesceSpec();&lt;BR /&gt;var vimPortType = new VimPortTypeClient("&lt;FONT color="#FF0000"&gt;StartInGuest&lt;/FONT&gt;", @"&lt;FONT color="#FF0000"&gt;https://localhost/sdk/vimService&lt;/FONT&gt;");&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;long pid = vimPortType.StartProgramInGuest(processMgr, vmRef, auth, progSpec);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;catch (System.Web.Services.Protocols.SoapException se)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(se.Message);&lt;BR /&gt;Console.WriteLine(se.Detail.FirstChild.LocalName);&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(ex);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2021 09:54:38 GMT</pubDate>
    <dc:creator>vmwareAXI</dc:creator>
    <dc:date>2021-01-25T09:54:38Z</dc:date>
    <item>
      <title>What is parameter should I write about StartProgramInGuest related?</title>
      <link>https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/What-is-parameter-should-I-write-about-StartProgramInGuest/m-p/2825102#M503</link>
      <description>&lt;P&gt;I would like to run program in guest OS.&lt;/P&gt;&lt;P&gt;Version: vSphere web service SDK 7.0&lt;/P&gt;&lt;P&gt;Language: C#&lt;/P&gt;&lt;P&gt;I do not know how to new a instance to invoke StartProgramInGuest. Could someone help me? I would appreicate you very much.&lt;/P&gt;&lt;P&gt;My program will have an error when executed to line "var vimPortType = new VimPortTypeClient("&lt;FONT color="#FF0000"&gt;StartInGuest&lt;/FONT&gt;", @"&lt;FONT color="#FF0000"&gt;https://localhost/sdk/vimService&lt;/FONT&gt;");"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code ##############################################################&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using Vim25Api;&lt;/P&gt;&lt;P&gt;other code ...&lt;/P&gt;&lt;P&gt;public static void StartInGuest()&lt;BR /&gt;{&lt;BR /&gt;ManagedObjectReference processMgr = new ManagedObjectReference();&lt;BR /&gt;processMgr.type = "GuestProcessManager";&lt;BR /&gt;processMgr.Value = "ha-guest-operations-process-manager";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NamePasswordAuthentication auth = new NamePasswordAuthentication();&lt;BR /&gt;auth.username = "zzz";&lt;BR /&gt;auth.password = "123";&lt;BR /&gt;auth.interactiveSession = true;&lt;/P&gt;&lt;P&gt;GuestProgramSpec progSpec = new GuestProgramSpec();&lt;BR /&gt;progSpec.programPath = "C:\\WINDOWS\\NOTEPAD.EXE";&lt;BR /&gt;progSpec.arguments = "";&lt;/P&gt;&lt;P&gt;var vmRef = new ManagedObjectReference { type = "VirtualMachine", Value = "vm-192" };&lt;/P&gt;&lt;P&gt;VirtualMachineGuestQuiesceSpec virtualMachineGuestQuiesceSpec = new VirtualMachineGuestQuiesceSpec();&lt;BR /&gt;var vimPortType = new VimPortTypeClient("&lt;FONT color="#FF0000"&gt;StartInGuest&lt;/FONT&gt;", @"&lt;FONT color="#FF0000"&gt;https://localhost/sdk/vimService&lt;/FONT&gt;");&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;long pid = vimPortType.StartProgramInGuest(processMgr, vmRef, auth, progSpec);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;catch (System.Web.Services.Protocols.SoapException se)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(se.Message);&lt;BR /&gt;Console.WriteLine(se.Detail.FirstChild.LocalName);&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(ex);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 09:54:38 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/What-is-parameter-should-I-write-about-StartProgramInGuest/m-p/2825102#M503</guid>
      <dc:creator>vmwareAXI</dc:creator>
      <dc:date>2021-01-25T09:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: What is parameter should I write about StartProgramInGuest related?</title>
      <link>https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/What-is-parameter-should-I-write-about-StartProgramInGuest/m-p/2825105#M504</link>
      <description>&lt;P&gt;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/5470396"&gt;@vmwareAXI&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Moderator: Moved to the &lt;STRONG&gt;vSphere Guest SDK Discussions&lt;/STRONG&gt; area (the closest I can see to the Web Service SDK) - this thread needs to be in the &lt;STRONG&gt;{code}&lt;/STRONG&gt; area.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 10:09:20 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/What-is-parameter-should-I-write-about-StartProgramInGuest/m-p/2825105#M504</guid>
      <dc:creator>scott28tt</dc:creator>
      <dc:date>2021-01-25T10:09:20Z</dc:date>
    </item>
  </channel>
</rss>

