The Windows Script Host enables users to write and execute scripts in VBScript, JavaScript, and other languages compatible with the Windows environment. It was initially developed as an additional component, but since Windows 98 it is integrated into all new editions of Windows operating system.
Script files usually have .vbs and .js extensions. They are executed from the Windows environment using wscript.exe or from the command prompt using csript.exe.
Execution of script files can also be initiated from Transact-SQL code. The following statement runs a demo script that starts Excel and populates a worksheet with information:
exec xp_cmdshell 'c:\windows\command\cscript.exe ' + 'c:\windows\samples\wsh\Excel.vbs', NO_OUTPUT