Sha256: 02eaa462244a8be6c70d7e4cce415cff275857d3bd424f04654e65ecb71de3cb

Contents?: true

Size: 806 Bytes

Versions: 10

Compression:

Stored size: 806 Bytes

Contents

require "pathname"
require "tmpdir"

require "vagrant/util/subprocess"

module VagrantPlugins
  module HostWindows
    module Cap
      class RDP
        def self.rdp_client(env, rdp_info)
          # Setup password
          cmdKeyArgs = [
            "/add:#{rdp_info[:host]}:#{rdp_info[:port]}",
            "/user:#{rdp_info[:username]}",
            "/pass:#{rdp_info[:password]}",
          ]
          Vagrant::Util::Subprocess.execute("cmdkey", *cmdKeyArgs)

          # Build up the args to mstsc
          args = ["/v:#{rdp_info[:host]}:#{rdp_info[:port]}"]
          if rdp_info[:extra_args]
            args = rdp_info[:extra_args] + args
          end
          # Launch it
          Vagrant::Util::Subprocess.execute("mstsc", *args, {:detach => true})
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/hosts/windows/cap/rdp.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.3.3.0 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.3.2.0 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.2.19.0 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.2.18.0 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.2.16.0 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.2.14.0 plugins/hosts/windows/cap/rdp.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.2.10.0 plugins/hosts/windows/cap/rdp.rb