Windows 3.1 VERSIONINFO - Version-Information Resource Example

ID: Q107992


The information in this article applies to:
  • Microsoft Visual Basic Professional Edition for Windows, version 3.0
  • Microsoft Windows 3.1


SUMMARY

Traditional Windows development suggests that you add version information to your compiled .EXE files. Microsoft provides two tools with Microsoft Visual C++ that allow Visual C++ programmers to add version information to compiled applications:

  • The Microsoft Resource Compiler (RC.EXE).


  • The Microsoft App Studio, a resource editor.


Unfortunately, at this time, Visual Basic programmers cannot add version information to Visual Basic generated .EXE files. Visual Basic does not have the abiliy to add resource information to its .EXE files. Nor can you use either the Microsoft Resource Compiler or the App Studio to add resource information to .EXE files generated by Visual Basic. There are however other third party Resource Compilers/Editors that will work with Visual Basic compiled .EXE files. One such tool is the "Resource Workshop" by Borland. You can contact Borland at 1-800-336-6464x8708.


MORE INFORMATION

Below is a step by step example illustrating how to add version information to a Visual Basic compiled EXE using Borland's "Resource Workshop."

Example of Adding Version Information to a VB Application

  1. Start Resource Workshop.


  2. From the Resource Menu, choose New (ALT+R N).


  3. Select VERSIONINFO as the resource type, and click OK.


  4. Resource Workshop displays a default script for version information. Delete this, and type in something similar to the following:
    
       1 VERSIONINFO LOADONCALL MOVEABLE FILEVERSION 1, 0, 0,
       5 PRODUCTVERSION 1, 0, 0, 10 FILEOS VOS__WINDOWS16 FILETYPE
       VFT_APP BEGIN
    
       BLOCK "StringFileInfo"
          BEGIN
             BLOCK "040904E4"
             BEGIN
                VALUE "CompanyName", "Some Company\000"
                VALUE "FileDescription", "What it is\000"
                VALUE "FileVersion", "03.00.0005\000"
                VALUE "InternalName", "XYZ.EXE\000"
                VALUE "LegalCopyright", "Copyright ) abcdefg"
                VALUE "LegalTrademarks", "Whatever you want\000"
                VALUE "ProductName", "asdfg\000"
                VALUE "ProductVersion", "see above"
                VALUE "Comments", "Some comments"
             END
          END
       END 


  5. Double-click the control box to close the current window. Click Yes when Resource Workshop asks you if you wish to save changes.


  6. Your Application now contains version information. Choose Exit from the File menu to exit Resource Workshop (ALT+F X). Click Yes when Resource Workshop asks you to verify that you want to update your EXE.



REFERENCES

For more information on the VERSIONINFO statement, see the WinSDK on-line help file (provided with the professional edition of Visual Basic as well as Visual C++) or the "Microsoft Windows Version 3.1 Programmer's Reference," Volume 1.

Additional query words: 3.00 3.10 setup set up install

Keywords : PrgOther
Version : 3.00
Platform : WINDOWS
Issue type :


Last Reviewed: September 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.