I'm writing a .vbs script for an application on Windows. The problem is that the ArrayList is used inside the script. MDSN states that the .NET Framework 4.8 installed is sufficient to use ArrayList. The problem is this - I tested this script on two machines: one running Windows 10, and the other running Windows Server 2016. On Windows 10 everything works fine, but on Windows Server 2016 it throws up the error ".NET Framework 3.5 is not installed" (or something like that). Moreover, this error appeared only once during the first attempt to run the script and on the line with the creation of the ArrayList object. In the end, I was able to solve the problem by manually enabling the .NET Framework 3.5 feature on the Windows Server 2016 machine. The problem is that performing such actions seems too cumbersome for our application users. In theory, the script should work simply after installing the .NET Framework 4.8 (which is a prerequisite for our application to work), but it does not work and I cannot understand why. I tried searching for information on this, and found some posts about problems working with ArrayList with .NET other than 3.5. I already use late binding in my script (if I understand correctly, this is creating an object via CreateObject("System.Collections.ArrayList")), but this does not help. Also, the machine on WServer 2016 has .NET Framework 4.8 installed (I looked at the version through the registry according to the instructions on MDSN), but until I enabled .NET 3.5, the script did not work. What could be the problem causing ArrayList not to work with .NET Framework 4.8? Could this be some local issue with Windows Server 2016?
-
VBScript is in the process of deprecation; it might not be worth solving this, but instead: finding a different/alternative solutionMarc Gravell– Marc Gravell2024-10-21 12:41:46 +00:00Commented Oct 21, 2024 at 12:41
-
1I don't have a solution, but I had the same problem. I solved it my enabling .Net framework 3.5 where needed, but it would be nice if there would be a better solution.Geert Bellekens– Geert Bellekens2024-10-21 12:48:11 +00:00Commented Oct 21, 2024 at 12:48
-
@MarcGravell unfortunately, using vbs is not my decision, so i can't(Ivan Serdukov– Ivan Serdukov2024-10-21 12:48:25 +00:00Commented Oct 21, 2024 at 12:48
Add a comment
|