Windows 3.1 VERSIONINFO - Version-Information Resource Example

Last reviewed: October 10, 1997
Article ID: Q107992
3.00 WINDOWS kbprg

The information in this article applies to:

  • Professional Edition of Microsoft Visual Basic for Windows, version 3.0
  • Microsoft Windows version 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 reference words: 3.00 3.10 setup set up install
KBCategory: kbprg
KBSubcategory: PrgOther
Keywords : PrgOther kbprg
Version : 3.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.