Questions tagged [wsh]

For questions relating to Windows Script Host (WSH), a language-independent scripting host for the Windows operating system. It allows scripts to be run from both the graphical Windows desktop (via WScript.exe) and the command prompt (via CScript.exe).

Windows Script Host (sometimes abbreviated as WSH), in both Wscript.exe and Cscript.exe guises, can run VBScript (*.VBS, *.VBE) and JScript (*.JS, *.JSE), via Microsoft-provided script engines that are bundled with the OS and installed by default.

In addition to VBScript and JScript, there are third-party script engines for WSH that you can download to allow the use of Python, REXX, Perl, and other languages. (The script engines that add into WSH are distinct from standalone script interpreters that might exist for those languages, on Windows).

Multiple languages can be mixed in Windows Script Files (*.WSF). These types of scripts may also be used to link many other external scripts together using a src parameter on the <script> tag in a manner similar to HTML. A WSF makes reference to each script module in a very basic XML hierarchy and it's a package that can be organized in jobs.

Regardless of whether the UI is console-based or graphical, the same underlying script engine is used. In UI mode, the host is WScript.exe (used by default); in console mode, the host is CScript.exe.

The Windows Script Host has been part of every Microsoft Windows operating system's installation since Windows 98.

In 2006, Microsoft released v1.0 of Windows PowerShell, which could be conceived as a replacement for, or successor of, Windows Script Host. PowerShell is now included in every Windows OS. Even so, WSH is still included in every Windows OS, and many Wscript programs will continue to be in service, for many years.

References:

Related tags:

1078 questions
-1
votes
1 answer

Combining multiple CSV files to a single xls file

I have multiple CSV files say 5 of them, I want to consoildate all these CSV to a single excel workbook in separate sheets of that Combined excel file. Please help me.
Suvojit
  • 379
  • 1
  • 7
  • 22
-1
votes
1 answer

Converting a for loop from Windows to Bash

I've been stuck on a particular for loop in a Windows script and I can't find any help on how to translate it to its Bash equivalent. The code is here: for f "tokens=2 delims=#" %%a in $step; do set devnum=%%a set $devnum=$devnum:)=% I understand…
-1
votes
2 answers

Extracting strings and writing to a new file

I was googling around but didn't find the right answer, perhaps people from here are willingly and able to help me. I'm very new to VBS or WSH and I like to have a solution for this problem: I'm searching for textstrings within a file without a…
-1
votes
1 answer

In VBScript is there any way to get the fullpath to a file which can be present in any directory?

Currently I am using hard-code PATH to a .EXCEL file in my Scripting language,Like as below: Set objExcel1 = CreateObject("Excel.Application") strPathExcel1 = "D:\VA\GE_Wing_To_Wing_Report.xlsx" Set objWB =…
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
-1
votes
1 answer

How to launch an EXE from Web page with asp.net4

i use this code: