Runtime error '-2146232576 (80131700)': Automation error (1 Viewer)

Pac-Man

Active member
Local time
Today, 14:54
Joined
Apr 14, 2020
Messages
416
Hello,

I am getting subject-mentioned error on execution of both Set sysText = CreateObject(SYS_TEXT_UTF8) and With CreateObject(SHA512_MANAGED). This error is resolved when I install .Net FW 3.5 however there are few PCs with my users on which we are unable to install .Net FW 3.5 as those PCs came with Windows 10 pre-unstalled and didn't receive install CD with them. To install .Net FW 3.5, we need to use DISM command with install CD inside DVD ROM.

I hope there would be some method like referencing some .Net FW dll files so that this code could run without .Net FW 3.5.

Code:
Const SYS_TEXT_UTF8   As String = "System.Text.UTF8Encoding", _
        SHA512_MANAGED  As String = "System.Security.Cryptography.SHA512Managed"

  Dim sysText           As Object, _
      arrBytes          As Variant

  Set sysText = CreateObject(SYS_TEXT_UTF8)

  With CreateObject(SHA512_MANAGED)

    arrBytes = .ComputeHash_2(sysText.GetBytes_4(strToHash))
  End With
 

jdraw

Super Moderator
Staff member
Local time
Today, 05:54
Joined
Jan 23, 2006
Messages
15,383
You could try this site--download is free and you can install via ControlPanel.
 

Pac-Man

Active member
Local time
Today, 14:54
Joined
Apr 14, 2020
Messages
416
You could try this site--download is free and you can install via ControlPanel.
Thanks for link. Sorry I forgot to mention that the PC don't have internet and I knew the control panel method but that method required internet and so does the web installer. I tried finding .Net 3.5 redistributable offline installer but none worked on Windows 10.
 

sonic8

AWF VIP
Local time
Today, 11:54
Joined
Oct 27, 2015
Messages
998
I hope there would be some method like referencing some .Net FW dll files so that this code could run without .Net FW 3.5.
That's exactly what I would recommend. Research an alternative but similar approach that works with the .Net Fx 4.*. Even though .Net 3.5 is officially supported till 2029, it makes more sense long-term to use the newer versions of the framework.
 

Users who are viewing this thread

Top Bottom