Skip to content

Commit d8b782c

Browse files
committed
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.
1 parent f3541e2 commit d8b782c

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

installer/modify_msi.vbs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,16 @@ Dim record
3434
Set record = view.Fetch
3535
Dim gFile, pos
3636
Do While not record Is Nothing
37-
gFile = record.StringData(1)
38-
If Left(gFile, 8) = "psqlodbc" Then
39-
gFile = record.StringData(3)
40-
' Check if the FileName field is ShortName|LongName
41-
pos = InStr(record.StringData(3), "|")
42-
If pos > 0 Then
43-
' Omit the ShortName part
44-
gFile = Mid(record.StringData(3), pos + 1)
45-
WScript.echo record.StringData(3) & " -> " & gFile
46-
' And update the field
47-
record.StringData(3) = gFile
48-
view.Modify msiViewModifyUpdate, record
49-
End If
37+
' Check if the FileName field is ShortName|LongName
38+
gFile = record.StringData(3)
39+
pos = InStr(gFile, "|psqlodbc")
40+
If (pos > 0) Then
41+
' Omit the ShortName part
42+
gFile = Mid(gFile, pos + 1)
43+
WScript.echo record.StringData(3) & " -> " & gFile
44+
' And update the field
45+
record.StringData(3) = gFile
46+
view.Modify msiViewModifyUpdate, record
5047
End If
5148
Set record = view.Fetch
5249
Loop

0 commit comments

Comments
 (0)