Skip to content

Commit

Permalink
Switch installer custom action from jscript to vbscript
Browse files Browse the repository at this point in the history
* MS has deleted vbscript because breaking things is fun, so we use jscript
  instead to do the weird replace of '#' so that numbers read from the registry
  can be compared to numbers
  • Loading branch information
baldurk committed Jan 14, 2025
1 parent 6feafaf commit 4f91478
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions util/installer/Installer32.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@
</Property>

<!-- the versions are stored in DWORDs which windows installer returns as #14 etc. We need to strip the # to actually compare :( -->
<CustomAction Id="RemoveHash" Script="vbscript">
<CustomAction Id="RemoveHash" Script="jscript">
<![CDATA[
Session.Property("VCRT32MAJOR") = Replace(Session.Property("VCRT32MAJOR"),"#","")
Session.Property("VCRT32MINOR") = Replace(Session.Property("VCRT32MINOR"),"#","")
Session.Property("VCRT32MAJOR") = Session.Property("VCRT32MAJOR").replace("#","")
Session.Property("VCRT32MINOR") = Session.Property("VCRT32MINOR").replace("#","")
]]>
</CustomAction>

Expand Down
10 changes: 5 additions & 5 deletions util/installer/Installer64.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,12 @@
</Property>

<!-- the versions are stored in DWORDs which windows installer returns as #14 etc. We need to strip the # to actually compare :( -->
<CustomAction Id="RemoveHash" Script="vbscript">
<CustomAction Id="RemoveHash" Script="jscript">
<![CDATA[
Session.Property("VCRT64MAJOR") = Replace(Session.Property("VCRT64MAJOR"),"#","")
Session.Property("VCRT64MINOR") = Replace(Session.Property("VCRT64MINOR"),"#","")
Session.Property("VCRT32MAJOR") = Replace(Session.Property("VCRT32MAJOR"),"#","")
Session.Property("VCRT32MINOR") = Replace(Session.Property("VCRT32MINOR"),"#","")
Session.Property("VCRT64MAJOR") = Session.Property("VCRT64MAJOR").replace("#","")
Session.Property("VCRT64MINOR") = Session.Property("VCRT64MINOR").replace("#","")
Session.Property("VCRT32MAJOR") = Session.Property("VCRT32MAJOR").replace("#","")
Session.Property("VCRT32MINOR") = Session.Property("VCRT32MINOR").replace("#","")
]]>
</CustomAction>

Expand Down

0 comments on commit 4f91478

Please sign in to comment.