You can use the file version information APIs (version.dll) to query the original filename from the exe file.
___
[tt]
Option Explicit
Private Declare Function VerQueryValue Lib "version" Alias "VerQueryValueA" (pBlock As Any, ByVal lpSubBlock As String, lplpBuffer As Long, puLen As Long) As Long
Private Declare Function GetFileVersionInfoSize Lib "version" Alias "GetFileVersionInfoSizeA" (ByVal lptstrFilename As String, lpdwHandle As Long) As Long
Private Declare Function GetFileVersionInfo Lib "version" Alias "GetFileVersionInfoA" (ByVal lptstrFilename As String, ByVal dwHandle As Long, ByVal dwLen As Long, lpData As Any) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Function GetOriginalFileName(FileName As String) As String
Dim VerInfoSize As Long, lpdwHandle As Long, Buffer() As Byte
Dim strLangCharSet As String, lpData As Long, cbData As Long
'Query the size of the version info data
VerInfoSize = GetFileVersionInfoSize(FileName, lpdwHandle)
If VerInfoSize = 0 Then Exit Function
'Create the version info buffer and query the data
ReDim Buffer(0 To VerInfoSize - 1)
If GetFileVersionInfo(FileName, 0, VerInfoSize, Buffer(0)) = 0 Then Exit Function
'Query the language/character set identifier
If VerQueryValue(Buffer(0), "\VarFileInfo\Translation", lpData, cbData) = 0 Then Exit Function
CopyMemory lpData, ByVal lpData, 4
strLangCharSet = Hex$(lpData) 'convert to hex
strLangCharSet = Right$("00000000" & strLangCharSet, 8) 'pad leading zeroes
strLangCharSet = Right$(strLangCharSet, 4) & Left$(strLangCharSet, 4) 'swap the upper and lower words
'Query the original file name
Dim S As String
If VerQueryValue(Buffer(0), "\StringFileInfo\" & strLangCharSet & "\OriginalFilename", lpData, cbData) = 0 Then Exit Function
S = Space$(cbData)
CopyMemory ByVal S, ByVal lpData, cbData
GetOriginalFileName = Split(S, vbNullChar)(0)
End Function
Private Sub Form_Load()
MsgBox GetOriginalFileName("calc.exe"

End Sub[/tt]
___
You can pass the path of any executable file to retrieve its orginal file name specified at the time of compilition.