A month ago I posted here a suggestion to use UiPath BAPI activity without an additional installation of SAP dotNET Connector (NCo), only with SAP GUI for Windows. Today I tried a way to realize this which I want to describe here briefly:
Download UiPath.SAP.BAPI.Activities.2.2.2.nupkg.
Extract UiPath.SAP.BAPI.dll.
Patch hex 03 00 00 00 00 00 2A 00 to 03 00 01 00 00 00 2A 00. This is the version number of sapnco.dll and sapnco_utils.dll in the AssemblyRef table stream of the PE. This hex code appears twice in the file. On this way you change assembly version from 3.0.0.42 to 3.1.0.42, the version number of the SAP NCo, which is delivered with the SAP GUI for Windows.
Write the patched file back to NuGet packaged.
Download ClosedXML.0.95.3.nupkg and DocumentFormat.OpenXml.2.11.3.nupkg.
Install the BAPI activity via Managed Packages.
Now everything is done to use the UiPath.SAP.BAPI.Activity without an additional SAP NCo installation.
@StefanSchnell I did not want even to give a like on this post :)))))
Amazing post, this remember me on my time learning assembler, debugging the stuff and searching for such Tech-Hacks and ideas for software improvement on MS-DOS.
"You are responsibility for yourself" → Love this disclaimer!!!
I was a bit reluctant to write this post but decided to do so. I know, patching binary files is really not an easy task and that it is something at the borderline. But I thought to myself that this knowledge might be very helpful for some people - as workaround.
You learned good old fashioned MS-DOS Assembler, me too
Do you remember the opcode sequence B4 30 CD 21 to get the MS-DOS version number and to patch the following byte sequence so that the program runs on any version?