none
Windows 10 issue with VBScript using ArrayList RRS feed

  • Question

  • I have a single line in a VBScript method that works fine on Windows 7, but will not work with Windows 10.

    Code:

      Set Tests = CreateObject("System.Collections.ArrayList")

    I get a generic runtime error with no other information. I'm wondering if this might be an issue of the .Net 4.6 framework not supporting this method. My Win 7 machine has 4.52 installed and it works great.

    It seems so benign and simple, but I'm at a loss as to what to do going forward other than rewriting the code using a different method for the list.

    Any help is appreciated.

    Tuesday, September 15, 2015 5:32 PM

Answers

  • I found the solution to my problem.

    This code was being executed from a host program and didn't provide any debug information other than the generic runtime error box.

    I created a standalone test script to execute and windows was able to detect and suggest the solution. It turns out I needed an earlier version of .Net 3.5. This fixed my problem.

    • Marked as answer by Scott GMan Tuesday, September 15, 2015 11:16 PM
    Tuesday, September 15, 2015 11:16 PM

All replies

  • Works fine for me on the latest version of Windows 10.

    \_(ツ)_/

    Tuesday, September 15, 2015 5:41 PM
  • I found the solution to my problem.

    This code was being executed from a host program and didn't provide any debug information other than the generic runtime error box.

    I created a standalone test script to execute and windows was able to detect and suggest the solution. It turns out I needed an earlier version of .Net 3.5. This fixed my problem.

    • Marked as answer by Scott GMan Tuesday, September 15, 2015 11:16 PM
    Tuesday, September 15, 2015 11:16 PM
  • you cannot install an earlier version of 3.5 on Windows 10.  Is somebody pulling your leg?


    \_(ツ)_/

    Tuesday, September 15, 2015 11:43 PM
  • Sorry, I wrote it up quickly and it was poorly written.

    You can "install" from the Programs and Features page in the control panel. When open it and you see the ".NET Framework 3.5 (includes .NET 2.0 and 3.0)", you check it and click OK to install.

    What happened for me was I actually had Windows prompt me to install it when I tried to run my script.

    Here is a link to the solution, that I found after having already solved the problem.

    http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_install/how-to-instal-net-framework-35-on-windows-10/450b3ba6-4d19-45ae-840e-78519f36d7a4?auth=1

    Wednesday, September 16, 2015 2:44 PM
  • Even better is to use PowerShell rather than VBScript.


    -- Bill Stewart [Bill_Stewart]

    Wednesday, September 16, 2015 3:45 PM
    Moderator