WindowsInstaller 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/WindowsInstaller.rb +13 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d43fc638095054a625bc0ace126f773304a56d88b5e03e9a7aa019c0950ba8a9
|
4
|
+
data.tar.gz: 36929d59041d022ff4d4e6763e6e1d5d7a67a0e26b934bb700cf37172f5c4201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 235ff9c482839907df85afa87b4dba1966d8c17c6941e54a76f27bfe1a6b875bf89e6855cf60eb7fdd5072c05ca603495ff61009641308a4070b5d90272f4e86
|
7
|
+
data.tar.gz: fbb81824147808fb6b7bddf9d403e2dcd73c14f5cbd2f1d1605875fd3d1d6e4030b5240501e3f90d74556ef7d770f07feacc9fdbd1fb6396bb4fd474251ece7d
|
data/lib/WindowsInstaller.rb
CHANGED
@@ -154,28 +154,29 @@ class WindowsInstaller < Hash
|
|
154
154
|
|
155
155
|
def get_upgrade_codes
|
156
156
|
upgrade_codes = {}
|
157
|
-
|
158
|
-
|
159
|
-
|
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
|
-
|
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
|
-
|
166
|
+
record = view.Fetch
|
170
167
|
unless(record.nil?)
|
171
168
|
upgrade_code = record.StringData(1)
|
172
169
|
|
173
|
-
|
174
|
-
|
175
|
-
|
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
|
-
|
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.
|
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-
|
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.
|
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
|