{"id":17,"date":"2006-01-08T10:49:29","date_gmt":"2006-01-08T08:49:29","guid":{"rendered":"https:\/\/alax.info\/wp\/?p=17"},"modified":"2011-09-05T10:16:29","modified_gmt":"2011-09-05T08:16:29","slug":"resource-updater","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/17","title":{"rendered":"Resource Updater"},"content":{"rendered":"<p>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.<\/p>\n<p>We are unlikely to document it, I just leave a sample code illustrating how it all works.<\/p>\n<p><em>Sample.js:<\/em><\/p>\n<blockquote><p>Image = new ActiveXObject(&#8220;AlaxInfoResourceTools.Image&#8221;);<br \/>\nImage.Initialize(&#8220;C:\\\\Sample.dll&#8221;);<br \/>\nWScript.Echo(&#8220;Product Version: &#8221; + Image.VersionInfo.ProductVersionString);<br \/>\nWScript.Echo(&#8220;File Version: &#8221; + Image.VersionInfo.FileVersionString);<br \/>\nvar ProductName = Image.VersionInfo.GetString(0, &#8220;ProductName&#8221;);<br \/>\nvar OemProductName = Image.VersionInfo.GetString(0, &#8220;OemProductName&#8221;);<br \/>\nWScript.Echo(&#8220;ProductName: &#8221; + ProductName);<br \/>\nWScript.Echo(&#8220;OemProductName: &#8221; + OemProductName);<br \/>\nImage.VersionInfo.SetString(0, &#8220;OemProductName&#8221;, &#8220;\/\/ &#8221; + ProductName);<br \/>\nImage.VersionInfo.Update();<br \/>\nImage.EndUpdate(false);<\/p><\/blockquote>\n<p>Curious ones are invited to open type library to find out the syntax.<\/p>\n<p><del>Download the COM object (265K)<\/del> <a href=\"https:\/\/www.alax.info\/svn\/public\/trunk\/ResourceTools\/ResourceToolsSetup.msi\">ResourceToolsSetup.msi<\/a> (Win32, 32-bit)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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(&#8220;AlaxInfoResourceTools.Image&#8221;);&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/17\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-resource-tools"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}