Windows Script Host

Windows Script Host(ウインドウズ・スクリプト・ホスト)とは、Microsoft Windowsにおいてテキストファイルに記述したスクリ�…

Windows Script Host

Windows Script Host(ウインドウズ・スクリプト・ホスト)とは、Microsoft Windowsにおいてテキストファイルに記述したスクリプトを実行するスクリプト実行環境である。WSHと略される。かつてはWindows Scripting Hostと称した。

Windows 98から搭載された。UNIXにおけるシェルスクリプトや、DOSにおけるバッチファイルと似た位置づけの技術である。

概要

標準では、VBScriptJScriptを利用できる。また、WSHはActive Scriptingのホストとなっているため、他のスクリプト言語用の動作環境(エンジン)をインストールすることにより、Perlなどでも処理を行えるので、利用者自身が慣れた言語を使用できる。

また、COMを通じてレジストリの操作やWMIへのアクセスが可能であるなど、強力な機能を持っている。そのため、非常に高度で煩雑な処理を記述できるようになった。

経緯

本来、コンピュータとは、煩雑であるが機械的な処理が可能な作業を人間から肩代わりする存在である。

Windowsでは、DOSの時代から伝統的にバッチファイルが実装されており、これによってバッチ処理を実行させることが出来た。さらに、バッチファイルのシステムには時代の要請に合わせて新機能が追加されていった。

しかし、元々は単純な作業しか想定せずに設計されたバッチファイルのシステムに複雑な機能を追加していったため、バッチファイルは初心者には非常に使いづらいシステムになってしまった。また、それでも機能に限界があったため、複雑な処理を実行させるには複数のバッチファイルを作成し、連携させる必要があった。

そのため、より簡単に複雑なスクリプトを記述できるようなシステムが求められ、Windows Script Hostが誕生した。Windows Script Hostで利用が可能なVBScriptやJScriptは、バッチファイルより柔軟性がある構文を持ち、分かりやすい記述ができるスクリプト言語であるため、バッチファイルと比較して初心者にも扱いやすい物となっている。

今後

  • Windows Script Hostはある程度普及に成功したが、スクリプトを利用したウイルスや脆弱性攻撃などが増えた(レジストリにもアクセスできる強力な機能が逆に仇となった)ことや、ドキュメントの未整備によって次第に敬遠されるようになった。その状況を打破するため、マイクロソフトは広範囲にわたる管理タスクの自動化が可能であるように設計された新しいスクリプト実行環境であるWindows PowerShellをリリースした。

PowerShellの登場により、Windows Script Hostはその役割を終えたと言える。今後、新しい機能が追加される予定は無いとされている[要出典]

関連項目

外部リンク

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.