WindowsInstaller 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/WindowsInstaller.rb +10 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5ff780e6fe10433dfb6500420404c0863cd8630
|
4
|
+
data.tar.gz: be8950127d23ba7a9aec77791efb54872f4d0054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a3fd3a0720e0a8e7525411949628a01398a35d00cb25cfc39b57a61ff02280028afb92aefd3c02d3b914e9f5020ec155d27675af8d0564f26aaed9419ab12e1
|
7
|
+
data.tar.gz: 93f6f3ec959214c29352144b342a96235f804f9138bbbd71c839ab73d8d0e947192a1ddd773c3d0316c5c45cfa0206d9f5a19bd23b683cd712b96926666140ef
|
data/lib/WindowsInstaller.rb
CHANGED
@@ -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
|
-
|
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
|