Deutsch Deutsch  
Heaventools Home Page
Product Overview Solutions Download Support Purchase About

 

  RESOURCE TUNER CONSOLE :: VERSION INFO MODIFICATION
Command-line script driven resource editor

Product Name:

Resource Tuner Console (RTC)

Version:

1.62

Release Date:

July 10, 2008   [What's New]

Requirements:

Intel Pentium with 16 MB RAM (or higher)

Platforms:

 Windows 98, ME, NT4, 2000, XP, 2003, Vista

Price:

 $199 (Single Developer License)

Trial Version
Download

 Resource Tuner Console (2.00 Mb)


OVERVIEW

SOLUTIONS:
 
    • Overview
    • Version Info
    • Replace Icons
    • Manage Strings
    • See The Changes
 

DOWNLOAD

GETTING STARTED

SAMPLE SCRIPTS

ORDER NOW

REQUEST SUPPORT

ABOUT US

Easy Way to Update The Version Information

Application developers often need a command-line utility to allow modification of file version information on existing Windows EXE or DLL files. While these files already contain a Version Info resource (embedded into the executable during linking), Resource Tuner Console enables you to automatically stamp their version during the release process to insure consistency. If these files contain no Version Info resource, Resource Tuner Console will create this resource for you. Every field in the VERSIONINFO structure is under your control.

For instance, you have got code that depends on the value of the "Product Version" property of the setup.exe file, and the installations you have generated are missing the "build #" portion of that version. You may use Resource Tuner GUI to modify the properties of the setup.exe after you build it, but it is a manual process that you would rather not have to do every time you build a new release. See:  A real-world script example

From now on, you don't have to change version variables manually every time you rebuild your project. Let's get started with the VersionInfo automation.

1. Write a simple script (see below)
2. Run Resource Tuner Console
3. You are done.

The Version Information before:

Child Type: StringFileInfo
Language/Code Page: 1033/1252
CompanyName: Acme Corporation
FileDescription: Plain Editor
FileVersion: 1.0.0.0
InternalName: Generic application
LegalCopyright: Copyright © 1999 Acme Corp.      
LegalTrademarks:
OriginalFilename: editor.exe
ProductName:
ProductVersion: 1.0.0.0
Comments:

The Version Information after: (To see the changes made, we recommend using Resource Tuner GUI)

Child Type: StringFileInfo
Language/Code Page: 1033/1252
CompanyName: My Company
FileDescription: Yet Another Super Editor
FileVersion: 5.1.4.20
InternalName: Hot product
LegalCopyright: Copyright © 2006 My Company, Inc.
LegalTrademarks: your trademarks here...
OriginalFilename: editor.exe
ProductName: Super Editor
ProductVersion: 5.1.0.0
Comments: Powered by RT Console

The Script Used To Update The Version Information

This script is based on the Process Folder sample script. It may be helpful to use this example as a template for your own scripts. See also: RTC Usage

'----------------------------------------------------------------------------	
sub ProcessFile (Src_Path, Dest_Path, File_Name)
  LangID = 1033 ' English-US
  CP     = ScriptUnit.CodePageFromLangID(LangID)
  PEFileProxy.OpenFile Src_Path & File_Name
  if not PEFileProxy.Terminated then
    if PEFileProxy.HasResources then
      ResourcesProxy.SetLanguage LangID, DELETE_EXIST
      if ResourcesProxy.OpenVersionInfo("1", LangID, CREATE_IF_NOT_EXIST) then 
        VersionInfoProxy.SetFileVersion  5, 1, 4, 20, LangID, True, True, True
        VersionInfoProxy.SetProductVersion 5, 1, 0, 0, LangID, True, True, True

        S1 = "My Company"
        S2 = "Yet Another Super Editor"
        S3 = "Hot product"
        S4 = "Copyright \0xA9 2006 My Company, Inc."
        S5 = "your trademarks here..."
        S6 = "Super Editor"
        S7 = "Powered by RT Console"

        VersionInfoProxy.EditStringFileInfo "CompanyName", S1, CP, LangID, True, True
        VersionInfoProxy.EditStringFileInfo "FileDescription", S2, CP, LangID, True, True
        VersionInfoProxy.EditStringFileInfo "InternalName", S3, CP, LangID, True, True
        VersionInfoProxy.EditStringFileInfo "LegalCopyright", S4, CP, LangID, True, True
        VersionInfoProxy.EditStringFileInfo "LegalTrademarks", S5, CP, LangID, True, True
        VersionInfoProxy.EditStringFileInfo "ProductName", S6, CP, LangID, True, True
        VersionInfoProxy.EditStringFileInfo "Comments", S7, CP, LangID, True, True

        VersionInfoProxy.EditStringFileInfo "OriginalFilename", File_Name, CP, LangID, 
True, True

        ResourcesProxy.CloseVersionInfo
        PEFileProxy.Compile
        PEFileProxy.SaveAsNewImage Dest_Path & File_Name
      else
        PEFileProxy.PostDebugString "Can't open/create Version Info..."
      end if
    end if
  end if
end sub	
'----------------------------------------------------------------------------------
'----------------------------------------------------------------------------------
'
' The main routine.
'
' First, it scans a spicified Source folder for EXE files available.
' Then, for each file found it calls for the ProcessFile procedure.
'
'----------------------------------------------------------------------------------

sub Main
  dim Src_Path, Dest_Path, File_System_Object, Folder_Object, File_Object, File_Collection
  PEFileProxy.UpdateCheckSum = True
  PEFileProxy.CreateBackUp   = False
  ' Path to Source Folder
  Src_Path = ScriptUnit.CurrentFolder & "\demo\src\"
  ' Path to Destination Folder
  Dest_Path = ScriptUnit.CurrentFolder & "\demo\release\"
  ' Scan the specified folder, and then process all files found.
  set File_System_Object = CreateObject("Scripting.FileSystemObject")
  set Folder_Object      = File_System_Object.GetFolder(src_path)
  set File_Collection    = Folder_Object.Files
  for each File_Object in File_Collection
    ProcessFile Src_Path, Dest_Path, File_Object.name
    PEFileProxy.PostDebugString   "*************************************"
  next
end sub
'----------------------------------------------------------------------------------	
	

 

 Download Resource Tuner Console and learn how it can make you more productive. Start tuning your applications today!


 

Download Area    How To Order    Request Support    What's New    About Us    Site Map