WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: stanl on July 30, 2014, 09:37:38 AM

Title: OT: Question on Assemblies
Post by: stanl on July 30, 2014, 09:37:38 AM
I'm posting here rather than the COM section as it relates to a post Tony just made on a screen scraping thread. The code
Code (WINBATCH) Select

ObjectClrOption("use","UIAutomationClient, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")


specifically the Version. If you have .NET 4+ installed (which I assume means 3+ works) is there any benefit to using that version. Or, might that assembly be specific to 3+ so Version=2.0.0.0, would fail.

There have been posts to check for the version of .NET installed, and I have used that check in several scripts where the default is Version=4.0.0.0 but it changes to 3.0.0.0 if 4 not installed. Be nice if you could reference the assembly and get the highest version available.  [nit-picky]
Title: Re: OT: Question on Assemblies
Post by: Deana on July 30, 2014, 09:51:39 AM
Quote from: stanl on July 30, 2014, 09:37:38 AM
I'm posting here rather than the COM section as it relates to a post Tony just made on a screen scraping thread. The code
Code (WINBATCH) Select

ObjectClrOption("use","UIAutomationClient, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")


specifically the Version. If you have .NET 4+ installed (which I assume means 3+ works) is there any benefit to using that version. Or, might that assembly be specific to 3+ so Version=2.0.0.0, would fail.

There have been posts to check for the version of .NET installed, and I have used that check in several scripts where the default is Version=4.0.0.0 but it changes to 3.0.0.0 if 4 not installed. Be nice if you could reference the assembly and get the highest version available.  [nit-picky]

You probably should to use the lowest numbered version of assembly, so that it is supported on more systems. That is unless you need functionality that only became available in a certain newer version of the assembly.
Title: Re: OT: Question on Assemblies
Post by: td on July 30, 2014, 10:47:11 AM
FCL assemblies are not necessarily backwards or forward compatible so a script hosting the CLR should only use the assembly versions that it has been tested with.  In other words, WinBatch cannot dynamically pick assemblies for you.