WindowsInstaller 0.1.25 → 0.1.26

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 +13 -12
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54987116e79ed469a90d8a6d4d4c601f3f226c2ca3798610b28435129eec8c17
4
- data.tar.gz: dfc796c70ea50f38dcd2d4c25fe3f75329405cf03656847458b57c9143948c16
3
+ metadata.gz: d43fc638095054a625bc0ace126f773304a56d88b5e03e9a7aa019c0950ba8a9
4
+ data.tar.gz: 36929d59041d022ff4d4e6763e6e1d5d7a67a0e26b934bb700cf37172f5c4201
5
5
  SHA512:
6
- metadata.gz: 949294a0920e2a95968aab6c5f5681ec748480bf7ce95786352b9bb7953622bb6e4eda1fb64936cc1270262bf4e3f260f04c79c36b5d49ac2e848f3f0e39a63c
7
- data.tar.gz: 403efa01aec76ec953d24661c776a72817aa209f51c04340226b24380831d217df3f659f90018818a2206c8a72368fdb9ead74b399f77c58e8030c3313964560
6
+ metadata.gz: 235ff9c482839907df85afa87b4dba1966d8c17c6941e54a76f27bfe1a6b875bf89e6855cf60eb7fdd5072c05ca603495ff61009641308a4070b5d90272f4e86
7
+ data.tar.gz: fbb81824147808fb6b7bddf9d403e2dcd73c14f5cbd2f1d1605875fd3d1d6e4030b5240501e3f90d74556ef7d770f07feacc9fdbd1fb6396bb4fd474251ece7d
@@ -154,28 +154,29 @@ class WindowsInstaller < Hash
154
154
 
155
155
  def get_upgrade_codes
156
156
  upgrade_codes = {}
157
- property_value = @installer.ProductsEx('','',7).each do |prod|
158
- begin
159
- local_pkg = prod.InstallProperty('LocalPackage')
160
- rescue
161
- next
162
- end
157
+ property_value = @installer.ProductsEx('','',7).each do |prod|
158
+ begin
159
+ local_pkg = prod.InstallProperty('LocalPackage')
163
160
 
164
- db = @installer.OpenDataBase(local_pkg, 0)
161
+ db = @installer.OpenDataBase(local_pkg, 0)
165
162
  query = 'SELECT `Value` FROM `Property` WHERE `Property` = \'UpgradeCode\''
166
163
  view = db.OpenView(query)
167
164
  view.Execute
168
165
 
169
- record = view.Fetch
166
+ record = view.Fetch
170
167
  unless(record.nil?)
171
168
  upgrade_code = record.StringData(1)
172
169
 
173
- upgrade_codes[upgrade_code] ||= []
174
- upgrade_codes[upgrade_code] << prod.ProductCode
175
- end
170
+ upgrade_codes[upgrade_code] ||= []
171
+ upgrade_codes[upgrade_code] << prod.ProductCode
172
+ end
173
+
174
+ rescue
175
+ next
176
176
  end
177
+ end
177
178
 
178
- return upgrade_codes
179
+ return upgrade_codes
179
180
  end
180
181
 
181
182
  def get_upgrade_code(product_code)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: WindowsInstaller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.25
4
+ version: 0.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Marshall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2019-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execute
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.0.1
110
+ rubygems_version: 3.0.3
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Class wrapper for Microsoft Windows WindowsInstaller object