[SOLVED] Show windows details about the executable file or library

Windows specific questions.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Show windows details about the executable file or library

Post by dodicat »

Hi exagonx
Try creating file.rc with this:

Code: Select all

dim as string s
s+=chr(13,10)
s+=chr(13,10)
s+="1 VERSIONINFO"+chr(13,10)
s+="FILEVERSION     1,0,0,0"+chr(13,10)
s+="PRODUCTVERSION  1,0,0,0"+chr(13,10)
s+="BEGIN"+chr(13,10)
s+="  BLOCK "+chr(34)+"StringFileInfo"+chr(34)+chr(13,10)
s+="  BEGIN"+chr(13,10)
s+="    BLOCK ""080904E4"""+chr(13,10)
s+="    BEGIN"+chr(13,10)
s+="      VALUE ""CompanyName"", ""Some company"""+chr(13,10)
s+="      VALUE ""FileDescription"", ""Some description"""+chr(13,10)
s+="      VALUE ""FileVersion"", ""1.0"""+chr(13,10)
s+="      VALUE ""InternalName"", ""Some file name"""+chr(13,10)
s+="      VALUE ""LegalCopyright"", ""Some copyright"""+chr(13,10)
s+="      VALUE ""OriginalFilename"", ""shell.exe"""+chr(13,10)
s+="      VALUE ""ProductName"", ""Some product name"""+chr(13,10)
s+="      VALUE ""ProductVersion"", ""1.0"""+chr(13,10)
s+="    END"+chr(13,10)
s+="  END"+chr(13,10)
s+=chr(13,10)
s+="  BLOCK ""VarFileInfo"""+chr(13,10)
s+="  BEGIN"+chr(13,10)
s+="    VALUE ""Translation"", 0x809, 1252"+chr(13,10)
s+="  END"+chr(13,10)
s+="END"+chr(13,10)

function savefile(filename As String,p As String) as string
    Dim As long n=freefile
    If Open (filename For Binary Access Write As #n)=0 Then
        Put #n,,p
        Close
    Else
        Print "Unable to save " + filename:sleep:end
    End If
    return filename
End function

 savefile("file.rc",s)



 
Just do a quick run if your ide is able.
should be about 596 bytes.
If you still have problems try removing the chr(13,10) from the end
i.e.
s+="END"+chr(13,10)

Did anybody else have problems with this?
exagonx
Posts: 314
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: Show windows details about the executable file or library

Post by exagonx »

dodicat wrote: Mar 16, 2022 22:55 Hi exagonx
Try creating file.rc with this:
YES YES Its work

But why with notepad I cant create the RC file ?
Last edited by exagonx on Mar 17, 2022 1:53, edited 1 time in total.
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Show windows details about the executable file or library

Post by paul doe »

exagonx wrote: Mar 16, 2022 23:04 ...
But why with notepad I cant create the RC file ?
An issue with encoding, perhaps?
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Show windows details about the executable file or library

Post by TJF »

@exagonx

There's no need to quote the complete post you're responding to. Please stop to bload the forum with useless quotings.
exagonx
Posts: 314
Joined: Mar 20, 2009 17:03
Location: Italy
Contact:

Re: Show windows details about the executable file or library

Post by exagonx »

@TJF

Apologies I will edit all post for cut the quote.
Post Reply