Page 1 of 1 1
Topic Options
#214269 - 2023-10-11 04:05 PM VBSCRIPT end of the Road ahead.
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
Microsoft announced that VBSript will be installed optionally going forward, and eventually be removed from Windows.

https://www.techspot.com/news/100452-microsoft-plans-kill-vbscript-future-windows-releases.html

Top
#214270 - 2023-10-19 10:02 AM Re: VBSCRIPT end of the Road ahead. [Re: Allen]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Wow, I wonder how they will replace slmgr.vbs then, amongst others.
I did a quick scan of *.vbs on a Windows 11 machine and there are quite a few results from Microsoft itself.

 Code:
C:\Program Files\Microsoft Office\Office16\OSPP.VBS
C:\Windows\System32\gatherNetworkInfo.vbs
C:\Windows\System32\slmgr.vbs
C:\Windows\System32\SyncAppvPublishingServer.vbs
C:\Windows\System32\winrm.vbs
C:\Windows\System32\Printing_Admin_Scripts\en-US\prncnfg.vbs
C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnjobs.vbs
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnqctl.vbs
C:\Windows\System32\Printing_Admin_Scripts\en-US\pubprn.vbs
C:\Windows\SysWOW64\slmgr.vbs
C:\Windows\SysWOW64\winrm.vbs
C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\prncnfg.vbs
C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\prndrvr.vbs
C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\prnjobs.vbs
C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\prnmngr.vbs
C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\prnport.vbs
C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\prnqctl.vbs
C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\pubprn.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-a..nagement-appvclient_31bf3856ad364e35_10.0.22621.2070_none_ac8a770443970ffe\SyncAppvPublishingServer.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-a..nagement-appvclient_31bf3856ad364e35_10.0.22621.2283_none_ac75931e43a6ae1a\SyncAppvPublishingServer.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-iis-legacyscripts_31bf3856ad364e35_10.0.22621.1_none_dfdc389d6af52efc\adsutil.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-iis-legacyscripts_31bf3856ad364e35_10.0.22621.1_none_dfdc389d6af52efc\IIsExt.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-nettrace-netsh-helper_31bf3856ad364e35_10.0.22621.1_none_fcc32c0b64120b7d\gatherNetworkInfo.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_70432baa400e82bb\prncnfg.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_70432baa400e82bb\prndrvr.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_70432baa400e82bb\prnjobs.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_70432baa400e82bb\prnmngr.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_70432baa400e82bb\prnport.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_70432baa400e82bb\prnqctl.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_70432baa400e82bb\pubprn.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-security-spp-tools_31bf3856ad364e35_10.0.22621.1_none_a72f11d2b2de8e85\slmgr.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-w..for-management-core_31bf3856ad364e35_10.0.22621.2070_none_aa7d75492877e03c\winrm.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-iis-legacyscripts_31bf3856ad364e35_10.0.22621.1_none_ea30e2ef9f55f0f7\IIsExt.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_7a97d5fc746f44b6\prncnfg.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_7a97d5fc746f44b6\prndrvr.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_7a97d5fc746f44b6\prnjobs.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_7a97d5fc746f44b6\prnmngr.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_7a97d5fc746f44b6\prnport.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_7a97d5fc746f44b6\prnqctl.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.22621.1_en-us_7a97d5fc746f44b6\pubprn.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-security-spp-tools_31bf3856ad364e35_10.0.22621.1_none_b183bc24e73f5080\slmgr.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-w..for-management-core_31bf3856ad364e35_10.0.22621.2070_none_b4d21f9b5cd8a237\winrm.vbs

Top
#214271 - 2023-12-16 07:32 PM Re: VBSCRIPT end of the Road ahead. [Re: Arend_]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
In Microsoft's next news of depreciation...

Microsoft deprecates Legacy console mode in Windows 11 and future releases


About Legacy Console mode

Differences between modes
The Console Host team strives to minimize differences between the Legacy and current modes of the console to ensure that as many customers as possible can run the most up-to-date version. If you experience an issue that requires you to use the legacy console that is not documented here, please contact the team on the microsoft/terminal GitHub repository or via the Feedback Hub for assistance.

16-bit applications on 32-bit Windows
Some 16-bit applications on 32-bit Windows use a virtual machine technology to operate called NTVDM. Often these applications use a graphical screen buffering mode in conjunction with the console hosting environment to operate. Only the legacy console experience supports these graphical buffering modes and the additional console API support required to power these applications. The system will automatically select the legacy console environment when one of these applications is launched.

IME Embedding
The legacy Console Host embedded the suggestion portion of the IME inside the hosting window by reserving a line at the bottom of the screen for suggestions. The current Console Host environment instead delegates this activity to the IME subsystem to display an overlay window above the console host with suggestions. In an environment where overlay windows are not possible (like with certain remoting tools), the legacy console host may be required.

API Differences
The major known difference between legacy and current is the implementation of UTF-8. The legacy host has extremely rudimentary and often incorrect support of UTF-8 with code page 65001. The current console host contains incremental improvements release-over-release of Windows 10 to improve this support. Applications that are attempting to rely on predicting "known incorrect" interpretations of UTF-8 from the legacy console will find themselves receiving different answers as support is improved.

Other differences experienced with APIs should be reported to the microsoft/terminal GitHub repository or via the Feedback Hub for triage and possible remediation.

Top
#214272 - 2023-12-18 09:34 PM Re: VBSCRIPT end of the Road ahead. [Re: Allen]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Personally I've never used the Legacy Console and though I've read thousands and thousands of user logs I've not seen anyone using it either.

That doesn't mean that perhaps some API call is being made that is not shown in the logs but my guess is that it's for very old software which most people are not running something that old.

Top
#214273 - 2023-12-18 11:19 PM Re: VBSCRIPT end of the Road ahead. [Re: NTDOC]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
I thought they were talking about CMD.exe. What other console is there?
Top
#214274 - 2024-01-11 03:29 AM Re: VBSCRIPT end of the Road ahead. [Re: Allen]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Isn't PowerShell a console? i actually ended up writing a PowerShell script recently, took a while to get used to a different syntax.
_________________________
There are two types of vessels, submarines and targets.

Top
#214275 - 2024-01-11 04:05 AM Re: VBSCRIPT end of the Road ahead. [Re: Sealeopard]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
Based on very limited googling, it appears that Legacy Mode is not something most people use. You can enable/disable by right clicking the title bar of CMD.exe or Powershell, select properties, and then check the box at the bottom of the page. I've never had a reason to use it.
Top
#214276 - 2024-01-12 03:14 AM Re: VBSCRIPT end of the Road ahead. [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Um, who are all these people?
Better question is where have they been all this time? \:\)

Hope everyone is doing great and knowing that our beloved scripting engine will keep working!
_________________________
Actually I am a Rocket Scientist! \:D

Top
#214277 - 2024-01-30 09:43 AM Re: VBSCRIPT end of the Road ahead. [Re: Sealeopard]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
I've made the switch a few years ago, took some time to get used to it, but now I love it.
I've rewritten all my nice KiX Scripts, especially the GUI ones to powershell.
Leveraging everything .Net has to offer, I do stick to Powershell 5.* though, since that runs native on Windows 10/11.

Top
#214316 - 2025-09-10 10:43 PM Re: VBSCRIPT end of the Road ahead. [Re: Arend_]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
https://www.neowin.net/news/vbscript-on-...y-vba-projects/

Since Microsoft was in the news again today reminding everyone that VBScript is being depreciated, I finally sat down and started trying to figure where I might feel this.

Inputbox(), WSHPipe(), and WSHShortCut() are the ones I immediately noticed.

Rarely, I need Inputbox, which was so slickly covered by scriptcontrol. After a ton of work (no thanks to Microsoft Copilot) here is a version using Powershell.


 Code:
Function InputBox($sPrompt, Optional $sTitle, Optional $sDefault)
    dim $PSCommand, $FH, $RC, $TempFile
    If Not $sTitle
      $sTitle = "Input Prompt"
    EndIf
    $TempFile = "%TEMP%\ps_inputbox.txt"
    if exist($TempFile)
      DEL $TempFile
    endif
    $PSCommand = 'powershell -Command "Add-Type -AssemblyName Microsoft.VisualBasic; '
    $PSCommand = $PSCommand + "$input = [Microsoft.VisualBasic.Interaction]::InputBox('" + $sPrompt + "','" + $sTitle + "','" + $sDefault + "'); "
    $PSCommand = $PSCommand + "$input | Out-File -FilePath '" + $TempFile + "' -Encoding ASCII"
    ;$PSCommand = "%COMSPEC% /c " + $PSCommand
    SHELL $PSCommand
    $fh = FreeFileHandle()
    If Open($fh, $TempFile) = 0
      $InputBox = ReadLine($fh)
      $RC=Close($fh)
    EndIf
EndFunction


Would someone mind checking this out and see if you can find issues with it and or report back if works for you?

I'm digging into details about the other two functions.

Top
#214317 - 2025-09-11 01:49 AM Re: VBSCRIPT end of the Road ahead. [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
I asked if using createobject("WScript.shell) would be affected by the vbscript depreciation. This is the response according to Microsoft Copilot....

"If you're using KiXtart or PowerShell to call COM objects, you're fine—until Microsoft decides to deprecate those COM interfaces too (which they haven’t announced yet"

 Quote:

what does safe for now mean?
“Safe for now” means that your current usage of CreateObject("WScript.Shell") in KiXtart or PowerShell is not directly impacted by VBScript’s deprecation—but it’s living on borrowed time.

Here's the nuance:
VBScript deprecation targets the vbscript.dll engine, which interprets .vbs files and embedded VBScript in HTAs and legacy apps2.

WScript.Shell is a COM object, not VBScript itself. You can still instantiate it from:

KiXtart

PowerShell

JScript

VB.NET

Even compiled C++ or C# via COM

So yes, CreateObject("WScript.Shell") is technically safe—but only outside of VBScript.

⚠️ What “safe for now” really means:
If you're using VBScript as the host language, like .vbs files or HTAs with <script language="VBScript">, those will eventually break.

If you're using KiXtart or PowerShell to call COM objects, you're fine—until Microsoft decides to deprecate those COM interfaces too (which they haven’t announced yet).


Top
#214318 - 2025-09-11 02:58 AM Re: VBSCRIPT end of the Road ahead. [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Personally, I have never used InputBox(), instead using KixForms. We deploy/register the DLL to be able to use Kix to run system-service type code via NSSM.exe. Since it's there, we leverage it for the one user-based interface app.

WshShortCut is used only in the install logic of our software - one call during the install and a second that runs daily to create the startup link if it's missing.

We do use WshPipe pretty extensively, with nearly 150 references across 36 of our applications. The team here has been looking at building an EXE or DLL that we could invoke that would replicate the ability to capture STDOUT/STDERR. We also have modified WSHPIPE pretty extensively to allow more control over returning either or both streams, control the wait time, and whether we terminate the app or not after the wait time expires.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#214319 - 2025-09-11 03:18 AM Re: VBSCRIPT end of the Road ahead. [Re: Glenn Barnas]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
Based on the response I got from CoPilot, it appears that wscript.shell scripts will be unaffected by the vbscript depreciation, so in theory WSHShell should be fine.
Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1005 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.064 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org