PDA

View Full Version : VBScript deprecated



Jan Karel Pieterse
05-23-2024, 02:49 AM
To my fellow VBA developers. If you have projects that depend on the Scripting Runtime library, beware. VBScript is going to be turned off and subsequently deprecated on Windows clients. Things like the Dictionary object, the FileSystemObject and other useful libraries will no longer be available and cause compile errors in your code. It isn't happening soon, but at least you'll have time to plan ahead: https://techcommunity.microsoft.com/t5/windows-it-pro-blog/vbscript-deprecation-timelines-and-next-steps/ba-p/4148301

Aussiebear
05-23-2024, 02:53 AM
Are they (Microsoft) offering an alternative?

Jan Karel Pieterse
05-23-2024, 02:55 AM
They mention PowerShell and JavaScript. No idea how as neither offers VBA integration as far as I'm aware.

Aussiebear
05-23-2024, 03:03 AM
Oh no..... not more stuff to peruse and muddle through.

Jan Karel Pieterse
05-23-2024, 05:06 AM
It does look like we can use Powershell. But no idea how or what is available precisely.

Jan Karel Pieterse
05-23-2024, 02:52 PM
Looks like it isn't all that bad, see this comment: https://techcommunity.microsoft.com/t5/windows-it-pro-blog/vbscript-deprecation-timelines-and-next-steps/bc-p/4150391/highlight/true#M7265

Paul_Hossler
05-23-2024, 03:37 PM
Looks like it isn't all that bad, see this comment: https://techcommunity.microsoft.com/t5/windows-it-pro-blog/vbscript-deprecation-timelines-and-next-steps/bc-p/4150391/highlight/true#M7265


I had a hard time following some of that

I use VBS for many stand alone scripts to replace my BAT files since I find VBS and WSH easier to work with than batch or Powershell

I looked at PS a little while ago and didn't really like it -- too complicated and the commands were insufficiently VBA like :)

Added:

I use Scripting.FileSystemObject and Scripting.Dictionary and Shell.Application as well as a lot of .NET structures I learned about from http://www.snb-vba.eu/