back to article VBScript nudged nearer to the grave with next big Windows 11 update

Microsoft has sent Windows 11 24H2 into the Release Preview channel and confirmed that VBScript will be starting its journey to full deprecation by becoming an on-by-default Feature On Demand (FOD). Windows 11 24H2 is this year's annual feature update for Microsoft's flagship operating system. It has been released first in the …

  1. SVD_NL Silver badge

    Ah VBScript..

    I still need to use it from time to time because our ERP system's report builder uses it, and any kind of custom logic needs VBScript as well. Honestly a neat little language, albeit quite limited.

    I can definitely see why they'd want to get rid of it though.

    1. Dan 55 Silver badge

      Re: Ah VBScript..

      Yes, it's difficult to charge a subscription for that.

      1. CowHorseFrog Silver badge

        Re: Ah VBScript..

        You arent thinking to the 4th dimension.

        Its not really the language that they wish to charge, its for all the supporting tech. If theres one thing a vendor like MS wants, its churn, buy a new license with new conditions and new costs. THey also get the bonus of being able to charge for both the old and the new replacement.

    2. An_Old_Dog Silver badge

      Re: Ah VBScript..

      VBScript ... yet another vendor-defined language, subject to breaking-change at any time by the vendor.

      Been there, done that (AppleScript), had my scripts broken (no migration tool), got the T-shirt.

      I'll stay with cross-platform Perl v5.x thank you.

  2. gv
    Mushroom

    Pinned to taskbar

    I'll decide what's pinned to MY taskbar, thank you very much.

    1. Doctor Syntax Silver badge

      Re: Pinned to taskbar

      You have your own taskbar as well as Microsoft's?

      1. karlkarl Silver badge

        Re: Pinned to taskbar

        I am sure somewhere in the terms and conditions, any custom taskbar we write, also now belongs to Microsoft ;)

      2. Slions

        Re: Pinned to taskbar

        I do:

        https://apps.microsoft.com/detail/9pcrfnn71jdx?hl=en-us&gl=US

    2. simonlb Silver badge

      Re: Pinned to taskbar

      "feedback we've heard from users throughout the preview of Copilot in Windows"

      This probably included such comments as:

      • "Why can't it do this?"
      • "Where do you do that?"
      • "It can only do what???"
      • "Has nobody even tested this crap?"

  3. Pascal Monett Silver badge

    Javascript instead of VBscript

    Wow, that's going to make all those Excel sheets reeaally easy to change . . .

    1. karlkarl Silver badge

      Re: Javascript instead of VBscript

      Isn't that VBA (Visual Basic for Applications) rather than VBS (VBScript)?

      The last bastion of Visual Basic (6) before Microsoft killed it and replaced it with a random C# based language with the same name.

      Yeah, that was deprecated a while ago when they realized the MSVBVM was an absolute bitch to port to different platforms (including Office 365 / Emscripten).

      1. katrinab Silver badge
        Meh

        Re: Javascript instead of VBscript

        But VBA hasn’t had an update since 2010, and that update was just 64bit support. The last real update was in 2007.

        Office Script, based on TypeScript looks like it is going to replace it. Also, much of what you used to need VBA for can now be done with Excel functions.

      2. CowHorseFrog Silver badge

        Re: Javascript instead of VBscript

        VBA is basically VBS, what makes you think they arent going to kill VBA as well. Dont forget they killed VB a long time ago and replaced with with VB.net which wasnt really anything like VB, and guess what happened to VB.net.... that got killed as well.

        1. david 12 Silver badge

          Re: Javascript instead of VBscript

          VBA is basically VBS in the same way the Rust is basically C#.

          But VBA has been on life support for years -- it was fatally wounded by association with and the move away from OLE. The only reason it survives is because it is so much better than the alternatives. It used to be a product you could buy from MS, in the same way you could buy VB6 or Foxpro. You could include it in your application in the same way that it is include in Word and VB5.

          1. DM2012

            Re: Javascript instead of VBscript

            The only reason it's survived so long is because there's so many legacy VBA macros out there that there would be an absolute revolt from enterprise if it was removed at this point.

            Cybersecurity programs everywhere are battling to shut down VBA macros wherever possible, or enable them only via exemption processes (I'm in the middle of yet another one of them at the moment) but the backlash from end users is often harsh. It's going to take a while before MS can fully kill it off without pissing a lot of heavy spenders off

    2. chuckamok

      Re: Javascript instead of VBscript

      Excel uses VBA.

      I just noticed O365 Spreadsheets can use TypeScript - in "Office Scripts" rather than macros.

    3. CowHorseFrog Silver badge

      Re: Javascript instead of VBscript

      where easy to change means,

      ... by haxors who want to blackmail your company...

  4. This post has been deleted by its author

  5. katrinab Silver badge
    Windows

    I mostly use VBScript to launch Powershell scripts from Task Scheduler because doing it that way means you don’t get a terminal window pop up on screen - VBA script launches batch script which launches Powershell.

    Is there another way to achieve this?

    1. Bendacious Silver badge

      The second answer on this page worked for me:

      https://stackoverflow.com/questions/1802127/how-to-run-a-powershell-script-without-displaying-a-window

      1. Spamfast
        Facepalm

        UNIX crusty sniggering

        I really love some of the answers on that page - using a VBS script to launch a CMD shell to launch a PowerShell script is a hoot.

        Which numpty decided to have this compile-time distinction between console and non-console apps anyway?

        Or at least why can't the GUI delay creating a console until the first API call that accesses it? Although probably the MS script interpreters do that before any user code starts to run anyway.

        The daft thing is that unlike MacOS9, the NT kernel is console based same as the VMS one one - I think.

        1. karlkarl Silver badge

          Re: UNIX crusty sniggering

          For our "cheap ports" to Windows, we make use of the WinAPI FreeConsole function.

          https://learn.microsoft.com/en-us/windows/console/freeconsole

          If you call it early on in your release builds (i.e #ifdef), due to the windowing system compositor's natural sluggishness, you never see the console in the first place.

        2. Paul Hovnanian Silver badge

          Re: UNIX crusty sniggering

          "Which numpty decided to have this compile-time distinction between console and non-console apps anyway?"

          Microsoft. The numpty that took years to (if indeed they ever did) get it through their thick skulls that not all processes had to talk to a user, fondling a mouse, sitting at a copy of Windows (per-seat license fully paid up).

          Most of the scripting languages that I've dealt with on *NIX boxes don't care (or know) whether they have been invoked by a command prompt involving a UI. Or from deep within a system daemon on a box that has nothing more than a blinking activity LED for a user interface.

    2. yetanotheraoc Silver badge

      intWindowStyle

      I think your way is best for total invisibility under all scenarios. It's even one of the answers on stackoverflow. I never had to deal with it because I would just do the whole thing in VBScript.

      Around these parts they let the powershell windows pop up on screen. I like to take screenshots (gotta be quick, like a video game) so I can look at the powershell error messages and track down what the scripts _should_ be doing.

      VBScript isn't pretty, but the language was implemented by people who knew what they were doing. Nowadays Microsoft only has people who don't understand that powershell and javascript can't do all the same things as VBScript. But if you don't care about windows popping up on screen, then I guess the current Microsoft employees are "good enough".

      1. Michael Wojcik Silver badge

        Re: intWindowStyle

        Javascript running under WSH should have the same windowing behavior as VBScript. The window is owned by WSH, not the script interpreter WSH is running.

        1. katrinab Silver badge
          Meh

          Re: intWindowStyle

          After some playing around:

          Launcher.js

          var WinScriptHost = WScript.CreateObject("WScript.Shell");

          WinScriptHost.Run('cmd /c C:\\Full\\Path\\To\\Launcher.bat', 0);

          var WinScriptHost = null;

          Launcher.bat

          powershell.exe "C:\Full\Path\To\Launcher.ps1"

          Then Launcher.ps1 has whatever you want it to do.

  6. Bendacious Silver badge

    Case insensitive but otherwise quite uptight

    Dim ImAVariableButWhatTypeAmI

    imavariablebutwhattypeami = Cstr("I'm a string!")

    WScript.Echo imavariablebutwhattypeami

    IMAVARIABLEBUTWHATTYPEAMI = CInt(-1)

    WScript.Echo "I'm an int now but can still be concatenated to a string - magic!: " & IMAVARIABLEBUTWHATTYPEAMI

    WScript.Echo "You'll miss this madness when it's gone"

    (Save this as a .vbs file then double-click for some old time fun)

    1. yetanotheraoc Silver badge

      Re: Case insensitive but otherwise quite uptight

      Is it magic if it's in the spec? The & operator does an implicit cast to string.

      https://documentation.help/MS-Office-VBScript/vsoprConcatenation.htm

      1. Bendacious Silver badge

        Re: Case insensitive but otherwise quite uptight

        If you are coming to VBScript from another language then case insensitive variable names and function names, plus dynamic typing, plus automatic casting (with or without the ampersand operator) is all slightly magic. It's a shame you've lost the sense of wonder I get from writing code.

        1. Michael Wojcik Silver badge

          Re: Case insensitive but otherwise quite uptight

          Not if that other language also has those behaviors.

          Personally, I prefer case sensitivity and strong typing, but it's not like they're universal.

          1. Bendacious Silver badge

            Re: Case insensitive but otherwise quite uptight

            I’m genuinely curious what other language has those ‘features’. I’ve written code in tens of languages but never seen that anywhere else than VBScript/VB6/VB.Net/VBA.

          2. CowHorseFrog Silver badge

            Re: Case insensitive but otherwise quite uptight

            Most people who dislike strong typing in both source and at runtime think they are SAVING time by not typing in those type names, but they cant see the big picture that it also helps save them days in the future when they need to come back and change something.

  7. ludicrous_buffoon

    Damn, I won't be able to send anyone on Windows 11 that fun vbscript I wrote that asked a series of nonsensical questions using the multi choice dialogues, and depending on the answer used a media player control to play Rick Astley's Never Gonna Give You Up. It could only be stopped by Task Manager.

    If you want to play with it: http://soft.thran.uk/files/cool%20script.vbs

    There is an underlying sadness here. It feels like Windows is becoming less something I recognise as it guts its quaint, ancient and characteristically Microsoft parts - to be replaced with horrors beyond even Active Desktop's comprehension.

  8. Mostly Irrelevant

    VBScript is such a security risk it should have been removed in Windows 7.

  9. ElNumbre
    Boffin

    Activation

    Isn't it still used for non-cloud activation of Microsoft Office with VL activation servers?

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like