Resource Updater

Sometimes an automated update of the binary resource is required, to update version, product name, some custom string etc. We have an utility for this and and it found itsself being very useful.

We are unlikely to document it, I just leave a sample code illustrating how it all works.

Sample.js:

Image = new ActiveXObject(“AlaxInfoResourceTools.Image”);
Image.Initialize(“C:\\Sample.dll”);
WScript.Echo(“Product Version: ” + Image.VersionInfo.ProductVersionString);
WScript.Echo(“File Version: ” + Image.VersionInfo.FileVersionString);
var ProductName = Image.VersionInfo.GetString(0, “ProductName”);
var OemProductName = Image.VersionInfo.GetString(0, “OemProductName”);
WScript.Echo(“ProductName: ” + ProductName);
WScript.Echo(“OemProductName: ” + OemProductName);
Image.VersionInfo.SetString(0, “OemProductName”, “// ” + ProductName);
Image.VersionInfo.Update();
Image.EndUpdate(false);

Curious ones are invited to open type library to find out the syntax.

Download the COM object (265K) ResourceToolsSetup.msi (Win32, 32-bit)

Leave a Reply