summaryrefslogtreecommitdiff
path: root/src/ext/PowerShell/wixext/PSCompiler.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-12-22 16:39:29 -0800
committerRob Mensching <rob@firegiant.com>2022-12-22 17:25:11 -0800
commit156ccd9db15eafe6b4fef72097dfa04337599f91 (patch)
tree0263cdc56dffa8e181c5221d73cae1e4b10ae58b /src/ext/PowerShell/wixext/PSCompiler.cs
parent8aafcc72550d89cc43dfcb81012abe8576709660 (diff)
downloadwix-156ccd9db15eafe6b4fef72097dfa04337599f91.tar.gz
wix-156ccd9db15eafe6b4fef72097dfa04337599f91.tar.bz2
wix-156ccd9db15eafe6b4fef72097dfa04337599f91.zip
Fix RegistrySymbol creation helper for non-string types
Fixes 7108
Diffstat (limited to 'src/ext/PowerShell/wixext/PSCompiler.cs')
-rw-r--r--src/ext/PowerShell/wixext/PSCompiler.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ext/PowerShell/wixext/PSCompiler.cs b/src/ext/PowerShell/wixext/PSCompiler.cs
index 37591282..7cb4149e 100644
--- a/src/ext/PowerShell/wixext/PSCompiler.cs
+++ b/src/ext/PowerShell/wixext/PSCompiler.cs
@@ -185,46 +185,46 @@ namespace WixToolset.PowerShell
185 var registryRoot = RegistryRootType.LocalMachine; // HKLM 185 var registryRoot = RegistryRootType.LocalMachine; // HKLM
186 var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, major, id); 186 var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, major, id);
187 187
188 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ApplicationBase", String.Format(CultureInfo.InvariantCulture, "[${0}]", componentId), componentId, false); 188 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ApplicationBase", String.Format(CultureInfo.InvariantCulture, "[${0}]", componentId), componentId);
189 189
190 // set the assembly name automatically when binding. 190 // set the assembly name automatically when binding.
191 // processorArchitecture is not handled correctly by PowerShell v1.0 191 // processorArchitecture is not handled correctly by PowerShell v1.0
192 // so format the assembly name explicitly. 192 // so format the assembly name explicitly.
193 var assemblyName = String.Format(CultureInfo.InvariantCulture, "!(bind.assemblyName.{0}), Version=!(bind.assemblyVersion.{0}), Culture=!(bind.assemblyCulture.{0}), PublicKeyToken=!(bind.assemblyPublicKeyToken.{0})", fileId); 193 var assemblyName = String.Format(CultureInfo.InvariantCulture, "!(bind.assemblyName.{0}), Version=!(bind.assemblyVersion.{0}), Culture=!(bind.assemblyCulture.{0}), PublicKeyToken=!(bind.assemblyPublicKeyToken.{0})", fileId);
194 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "AssemblyName", assemblyName, componentId, false); 194 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "AssemblyName", assemblyName, componentId);
195 195
196 if (null != customSnapInType) 196 if (null != customSnapInType)
197 { 197 {
198 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "CustomPSSnapInType", customSnapInType, componentId, false); 198 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "CustomPSSnapInType", customSnapInType, componentId);
199 } 199 }
200 200
201 if (null != description) 201 if (null != description)
202 { 202 {
203 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Description", description, componentId, false); 203 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Description", description, componentId);
204 } 204 }
205 205
206 if (null != descriptionIndirect) 206 if (null != descriptionIndirect)
207 { 207 {
208 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "DescriptionIndirect", descriptionIndirect, componentId, false); 208 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "DescriptionIndirect", descriptionIndirect, componentId);
209 } 209 }
210 210
211 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ModuleName", String.Format(CultureInfo.InvariantCulture, "[#{0}]", fileId), componentId, false); 211 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ModuleName", String.Format(CultureInfo.InvariantCulture, "[#{0}]", fileId), componentId);
212 212
213 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "PowerShellVersion", requiredPowerShellVersion.ToString(2), componentId, false); 213 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "PowerShellVersion", requiredPowerShellVersion.ToString(2), componentId);
214 214
215 if (null != vendor) 215 if (null != vendor)
216 { 216 {
217 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Vendor", vendor, componentId, false); 217 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Vendor", vendor, componentId);
218 } 218 }
219 219
220 if (null != vendorIndirect) 220 if (null != vendorIndirect)
221 { 221 {
222 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "VendorIndirect", vendorIndirect, componentId, false); 222 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "VendorIndirect", vendorIndirect, componentId);
223 } 223 }
224 224
225 if (null != version) 225 if (null != version)
226 { 226 {
227 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Version", version, componentId, false); 227 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Version", version, componentId);
228 } 228 }
229 } 229 }
230 230
@@ -279,7 +279,7 @@ namespace WixToolset.PowerShell
279 var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, String.Format(CultureInfo.InvariantCulture, "!(wix.{0}_{1})", VarPrefix, snapIn), snapIn); 279 var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, String.Format(CultureInfo.InvariantCulture, "!(wix.{0}_{1})", VarPrefix, snapIn), snapIn);
280 280
281 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId); 281 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId);
282 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[~][#{0}]", fileId), componentId, false); 282 this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[#{0}]", fileId), componentId, RegistryValueType.MultiString, RegistryValueActionType.Append);
283 } 283 }
284 } 284 }
285} 285}