From d8b782cda4bde991ce01566c423a16964e69d3cb Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Sat, 12 Oct 2024 11:42:51 +0200 Subject: [PATCH] Better select where to remove short file names Use the FileName column itself instead of the file ID. The approach from the previous commit also applied to pgenlista.dll and its PDB. --- installer/modify_msi.vbs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/installer/modify_msi.vbs b/installer/modify_msi.vbs index c1353fc8..9f586602 100755 --- a/installer/modify_msi.vbs +++ b/installer/modify_msi.vbs @@ -34,19 +34,16 @@ Dim record Set record = view.Fetch Dim gFile, pos Do While not record Is Nothing -gFile = record.StringData(1) -If Left(gFile, 8) = "psqlodbc" Then - gFile = record.StringData(3) - ' Check if the FileName field is ShortName|LongName - pos = InStr(record.StringData(3), "|") - If pos > 0 Then - ' Omit the ShortName part - gFile = Mid(record.StringData(3), pos + 1) - WScript.echo record.StringData(3) & " -> " & gFile - ' And update the field - record.StringData(3) = gFile - view.Modify msiViewModifyUpdate, record - End If +' Check if the FileName field is ShortName|LongName +gFile = record.StringData(3) +pos = InStr(gFile, "|psqlodbc") +If (pos > 0) Then + ' Omit the ShortName part + gFile = Mid(gFile, pos + 1) + WScript.echo record.StringData(3) & " -> " & gFile + ' And update the field + record.StringData(3) = gFile + view.Modify msiViewModifyUpdate, record End If Set record = view.Fetch Loop