WindowsInstaller 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/WindowsInstaller.rb +10 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50dba03c44f8ca0267d9449d4b6217f6c1b73d66
4
- data.tar.gz: c3e139b2ad6f544a1e417d0e0ef0674ac13eaf0a
3
+ metadata.gz: f5ff780e6fe10433dfb6500420404c0863cd8630
4
+ data.tar.gz: be8950127d23ba7a9aec77791efb54872f4d0054
5
5
  SHA512:
6
- metadata.gz: 1e8ffdd8cda89b6fddd91957cbc32c9d2a38668168bac68402dc246b6b67dc23ed5fd11baa80e32a42f2acd17c8a28869e7c6d1109128c4eba2c1c609d836c28
7
- data.tar.gz: 0a9822138fb173a7b3de945d9450e2f450dab8e2c001a94293ffefbdb451eb8506de33f724dcda3899c6d5599525335ba5ded5d74dd1fc3067055d2c65473325
6
+ metadata.gz: 5a3fd3a0720e0a8e7525411949628a01398a35d00cb25cfc39b57a61ff02280028afb92aefd3c02d3b914e9f5020ec155d27675af8d0564f26aaed9419ab12e1
7
+ data.tar.gz: 93f6f3ec959214c29352144b342a96235f804f9138bbbd71c839ab73d8d0e947192a1ddd773c3d0316c5c45cfa0206d9f5a19bd23b683cd712b96926666140ef
@@ -112,16 +112,19 @@ class WindowsInstaller < Hash
112
112
 
113
113
  def msiexec_admin(cmd, options)
114
114
  cmd = "runas /noprofile /savecred /user:#{self[:administrative_user]} \"#{cmd}\""
115
-
115
+ command = CMD.new(cmd, options)
116
+ wait_on_spawned(cmd) { cmd.execute }
117
+ end
118
+
119
+ def wait_on_spawned_process(cmd)
116
120
  pre_execute = Sys::ProcTable.ps
117
121
 
118
122
  pre_pids = []
119
123
  pre_execute.each { |ps| pre_pids << ps.pid }
120
-
121
- command = CMD.new(cmd, options)
122
- command.execute
123
124
 
124
- exe = cmd.match(/\\(?<path>.+\.exe)/i).named_captures['path']
125
+ yield
126
+
127
+ exe = cmd[:command].match(/\\(?<path>.+\.exe)/i).named_captures['path']
125
128
  exe = File.basename(exe)
126
129
  #puts "Exe: #{exe}"
127
130
 
@@ -137,6 +140,6 @@ class WindowsInstaller < Hash
137
140
  break if(s.nil?)
138
141
  sleep(1)
139
142
  end
140
- end
141
- end
143
+ end
144
+ end
142
145
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: WindowsInstaller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Marshall