VBScript is scheduled for deprecation! So?


Are you running the task as SYSTEM or Administrator (different user profile & FTA’s).
No.

And please don't spend any time on this. I was interested in finding out how to make the .js suggestion work but Les has already put so much effort into this.

I'm now happily using your own post #2 conhost headless solution for my TS intermediary files.
- Examples given in jak22 post #19 and my post #20.


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
Thank you so much

garlin

and

LesFerch


Code:
conhost --headless cmd /c script.bat
conhost --headless powershell -ep bypass -f script.ps1

That is working and I can use that for Task Scheduler jobs

If you're not distributing your code, you don't have to change anything. VBScript will remain available to install via Optional Features in the same way you can install other old stuff such as SMB 1.

They will completely remove VBS in future.

You can slso convert VBScript code to JScript and it will work exactly the same. ChatGPT or Copilot can be used to convert your scripts.


Yes I told copilot to convert some of my .vbs to .js and in my tests they are working in same way.

I have 251 vbs in my system.

%90 of them are not complicated (run exe/bat file hidden, run exe/bat file as admin, or both)
%5 of them is not necessary
%5 of them are a little complicated (for me), but i think i can handle them.


I have also a method for this (run exe/bat file hidden, run exe/bat file as admin, or both)

I can prepare exe files in BatToExeConverter, I can address an exe file to a bat file with same name.

exe can be run as administrator naturally or not
exe can hide console window or not

admin mode, show console
admin mode, hide console
normal mode, show console
normal mode, hide console

or I can prepare .exe files directly from my bat scripts, no need 2 files but everytime have to prepare new exe file if I want to change anything in script.

And worst thing is about BatToExeConverter and prepared exe files are considered as malwares by security softwares.

SS_20260215_14024456.webp
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
worst thing is about BatToExeConverter and prepared exe files are considered as malwares by security softwares

That might be because security detects the internal file decompressing / file re-creation action and regards it as suspicious.
I haven't checked any of these tools for a decade but BatToExeConverter & the others used to be self-extracting archives of the bat [as the .exe].
Then,
- when you run the exe, it extracts the bat from inside the exe into a temp folder, then
- runs the extracted bat file, then
- deletes the extracted bat file again on completion.

When I learnt about this, I realised that I wasn't actually achieving anything by using BatToExeConverter [or whichever ones it was I was testing].


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
also detects hidden admin right script working

It is my starter.exe for Road Rash to make it completely portable, so I can run it from any Game Library Launcher or I can play it in any computer from USB flash drive.


Code:
CD /D "%~dp0"

IF NOT EXIST .\CONF\Registry\roadrash.reg REG IMPORT .\EXTERNAL\Registry\roadrash.reg

REG IMPORT .\CONF\Registry\roadrash.reg

IF NOT EXIST .\CONF\Registry MD .\CONF\Registry

cd dxwnd

dxwnd.exe /r:0

cd..

REG EXPORT "HKLM\SOFTWARE\WOW6432Node\Electronic Arts\RoadRash 95" .\CONF\Registry\roadrash.reg /y

REG DELETE "HKLM\SOFTWARE\WOW6432Node\Electronic Arts\RoadRash 95" /f

FOR /F "tokens=*" %%A IN ('REG QUERY "HKLM\SOFTWARE\WOW6432Node\Electronic Arts" 2^>nul') DO (
    SET found=1
)

IF NOT DEFINED found (
    REG DELETE "HKLM\SOFTWARE\WOW6432Node\Electronic Arts" /f
)

EXIT
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
No.

And please don't spend any time on this. I was interested in finding out how to make the .js suggestion work but Les has already put so much effort into this.

I'm now happily using your own post #2 conhost headless solution for my TS intermediary files.
- Examples given in jak22 post #19 and my post #20.


Denis
Just to satisfy my curiosity, can you post an XML export of one of those scheduled tasks? Maybe I can replicate the JS issue if I use the same settings.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
can you post an XML export of one of those scheduled tasks?
There was nothing special in my Task definition.
I set the prog/script as you told me and set the argument as you told me as well.

Here's one of the Task definitions that I saved at the time. I think there was another version that put the JS file location in the prog/script box and just the path to the target lnk in the argument field - but I didn't find an xml of that in my notes [I've already weeded TS itself].


All the best,
Denis
 

Attachments

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
For what it's worth, the argument to my JavaScript file is also quoted (because it includes spaces). It is the exact same argument that was there for the VBScript version.

After copy and pasting @LesFerch's JavaScript code into a new file, saving it with the same name as my VBScript file (except with the .js extension), the only change I had to do in Task Scheduler was change the filename extension in the Program/script field from .vbs to .js; everything else remained untouched.

In the screenshot below, I scrolled to the end of the argument field, but it's a long filename path with multiple spaces.

Screenshot 2026-02-15 082035 - Copy.webp
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Microsoft Surface Laptop Studio
    Memory
    32GB
    Hard Drives
    1TB
There was nothing special in my Task definition.
I set the prog/script as you told me and set the argument as you told me as well.

Here's one of the Task definitions that I saved at the time. I think there was another version that put the JS file location in the prog/script box and just the path to the target lnk in the argument field - but I didn't find an xml of that in my notes [I've already weeded TS itself].
Thanks. I tested with a task created from your XML file (just changed the account) and I created files to match what is referenced in the task. I tested with right-click Run in Task Scheduler and via schtasks /run at the command line. It ran without any error or pop-ups. Running the script directly (instead of putting CScript.exe or WScript.exe in the program field) eliminates the console flash, but otherwise there was no difference for me.

It's very strange that you got "How do you want to open this file" when executing CScript.exe with the script name as an argument. I would only expect that pop-up to be a possibility when you directly run a .js (or .vbs) file. I guess the issue you were seeing will remain a mystery for now. :unsure:

If you're still interested in testing, maybe try re-registering the DLLs:

regsvr32 c:\windows\system32\jscript.dll
regsvr32 c:\windows\syswow64\jscript.dll
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
The AMD chipset driver installer looks like something else using VBScript and triggering deprecation alert event 4096
 

My Computer

System One

  • OS
    Windows 11

@Try3



I dont know if it will fix your task...

But I just look if there is any difference between my tasks with yours

<Command>c:\windows\system32\cscript.exe</Command>

mine command lines are also quoted

<Command>"c:\windows\system32\cscript.exe"</Command>
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
mine command lines are also quoted
Understood but that would make no difference in this case since there are no spaces in the path.
And I'm happy with the garlin conhost solution anyway [see posts garlin #2, jak22 #19, my #20].


All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
I converted all my 7 scheduled tasks vbs to js

"Alarm.js"
"Lock.js"
"Logoff.js"
"Logon.js"
"Shutdown.js"
"Sync.js"
"Unlock.js"

All of them are working.

An example of changing

Alarm.vbs
Code:
Dim WshShell,sScriptDir
Set WshShell = CreateObject("Scripting.FileSystemObject")
sScriptDir = WshShell.GetParentFolderName(WScript.ScriptFullName)
If Right(sScriptDir,1) <> "\" Then sScriptDir = sScriptDir & "\"

Set WshShell = CreateObject("Wscript.Shell")
WshShell.CurrentDirectory = sScriptDir
Set WshShell = Nothing

CreateObject("Wscript.Shell").Run "cmd /c " & chr(34) & sScriptDir & "Alarm.bat" & chr(34), 0, false

Alarm.js
Code:
var fso = new ActiveXObject("Scripting.FileSystemObject");

var sScriptDir = fso.GetParentFolderName(WScript.ScriptFullName);

if (sScriptDir.charAt(sScriptDir.length - 1) !== "\\") {
    sScriptDir = sScriptDir + "\\";
}

var shell = new ActiveXObject("WScript.Shell");
shell.CurrentDirectory = sScriptDir;

shell.Run('cmd /c "' + sScriptDir + 'Alarm.bat"', 0, false);

That was the easiest part for me. As you can see they were just .vbs files to start .bat files hidden without console.

I also changed arguments line of my scheduled task creator BAT scripts

<Command>"c:\windows\system32\wscript.exe"</Command>
<Arguments>"C:\Extras\SchtaskFiles\Alarm.vbs"</Arguments>

to

<Command>"c:\windows\system32\wscript.exe"</Command>
<Arguments>"C:\Extras\SchtaskFiles\Alarm.js"</Arguments>


Now I have to convert my context menu helper .vbs files to .js, it is a little complicated but i believe copilot can handle them LOL
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
Windows 11 25H2 (build 26200.6584) still has that 42 .vbs files in its system:

Code:
C:\Windows\System32\slmgr.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.26100.5074_none_6866448978075677\SyncAppvPublishingServer.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-iis-legacyscripts_31bf3856ad364e35_10.0.26100.6584_none_1a052cec273efb50\adsutil.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-iis-legacyscripts_31bf3856ad364e35_10.0.26100.6584_none_1a052cec273efb50\IIsExt.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_0ba10856b4dced01\prncnfg.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_0ba10856b4dced01\prndrvr.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_0ba10856b4dced01\prnjobs.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_0ba10856b4dced01\prnmngr.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_0ba10856b4dced01\prnport.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_0ba10856b4dced01\prnqctl.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_0ba10856b4dced01\pubprn.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-security-spp-tools_31bf3856ad364e35_10.0.26100.5074_none_e18d138d6f00b8a6\slmgr.vbs
C:\Windows\WinSxS\amd64_microsoft-windows-w..for-management-core_31bf3856ad364e35_10.0.26100.5074_none_665942ce5ce826b5\winrm.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-iis-legacyscripts_31bf3856ad364e35_10.0.26100.1_none_858ebf9c14245b3d\IIsExt.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-iis-legacyscripts_31bf3856ad364e35_10.0.26100.6584_none_2459d73e5b9fbd4b\IIsExt.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_15f5b2a8e93daefc\prncnfg.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_15f5b2a8e93daefc\prndrvr.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_15f5b2a8e93daefc\prnjobs.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_15f5b2a8e93daefc\prnmngr.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_15f5b2a8e93daefc\prnport.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_15f5b2a8e93daefc\prnqctl.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-p..inscripts.resources_31bf3856ad364e35_10.0.26100.1_en-us_15f5b2a8e93daefc\pubprn.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-security-spp-tools_31bf3856ad364e35_10.0.26100.5074_none_ebe1bddfa3617aa1\slmgr.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-w..for-management-core_31bf3856ad364e35_10.0.26100.1_none_d1adc81249f528d5\winrm.vbs
C:\Windows\WinSxS\wow64_microsoft-windows-w..for-management-core_31bf3856ad364e35_10.0.26100.5074_none_70aded209148e8b0\winrm.vbs
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
Windows 11 25H2 (build 26200.6584) still has that 42 .vbs files in its system:

Not really. A lot of those are hardlinks, and the prn*.vbs in the two system folders are duplicates of each other, varying only in signature.
 

My Computer

System One

  • OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Core i7-1260P
    Motherboard
    NUC12WSBi7
    Memory
    64 GB Micron PC4-25600
    Graphics Card(s)
    Intel Iris Xe Graphics
    Sound Card
    on-board Realtek HD Audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840 x 2160
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Crucial MX500 2 TB
    Antivirus
    Microsoft Defender
They will not exist in 26H2 :alien:
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
Removing slmgr would be catastrophic to the IT world. Most admins know it by heart.

There's a 3rd-party PS module, but that's not written by MS. I don't know how many enterprises would want to run a non-MS tool. VAMT exists for volume activation, but slmgr is found in so many scripts and online guides. If MS doesn't create a single EXE or PS equivalent, then it would be a big mess.
 

My Computer

System One

  • OS
    Windows 7
GIMP (Portable) has 2 .vbs files named empty

.\GIMP\App\gimp32\lib\python3.14\test\empty.vbs
.\GIMP\App\gimp\lib\python3.14\test\empty.vbs

Code:
'Empty VBS file, does nothing.  Helper for Lib\test\test_startfile.py.

Sordum.org Apps have 7 .vbs in their Apps' folders

.\dControl\Defender_Settings.vbs
.\EcMenu\Files\SnippingTool\SnippingTool.vbs
.\EcMenu\Files\StickyNotes\StickyNotes.vbs
.\FixSpooler\Example_Cmd.vbs
.\MonitorOff\_MonitorOff_Config.vbs
.\SendWKey\Example_Vbscript.vbs
.\UpdateTime\_UpdateTime_Options.vbs
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
I thought VBScript was already deprecated? I haven't been able to use it on various PCs for months now. Maybe even a year.
 

My Computer

System One

  • OS
    Windows 11 Pro
I thought VBScript was already deprecated? I haven't been able to use it on various PCs for months now. Maybe even a year.
It is deprecated, but it's still installed by default. So far, the only change is that it can be uninstalled via Optional Features. If you are using a work computer, your IT department may have uninstalled VBScript. If it's your own personal machine, and you didn't uninstall VBScript, I can only guess that your AV software is blocking it. What error do you get when you try to run a VBS file?
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Back
Top Bottom