Sha256: f34deafc692aa0ec124063ff4dc6ae190568b4c863783e6d10309e89637869f6

Contents?: true

Size: 787 Bytes

Versions: 46

Compression:

Stored size: 787 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)
        end
      end
    end
  end
end

Version data entries

46 entries across 42 versions & 5 rubygems

Version Path
vagrant-unbundled-2.0.4.0 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.0.3.0 plugins/hosts/windows/cap/rdp.rb
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/hosts/windows/cap/rdp.rb
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/hosts/windows/cap/rdp.rb
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.0.2.0 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.0.1.0 plugins/hosts/windows/cap/rdp.rb
vagrant-aws-mkubenka-0.7.2.pre.22 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-f3fdbf414272/plugins/hosts/windows/cap/rdp.rb
vagrant-aws-mkubenka-0.7.2.pre.16 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-1ee58c40e3f5/plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-2.0.0.1 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-1.9.8.1 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-1.9.7.1 plugins/hosts/windows/cap/rdp.rb
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/hosts/windows/cap/rdp.rb
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/hosts/windows/cap/rdp.rb
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/hosts/windows/cap/rdp.rb
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-1.9.5.1 plugins/hosts/windows/cap/rdp.rb
vagrant-unbundled-1.9.1.1 plugins/hosts/windows/cap/rdp.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/hosts/windows/cap/rdp.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/hosts/windows/cap/rdp.rb