Windows Script File

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Link other languages/formats mentioned)
(Category:Windows)
 
Line 6: Line 6:
 
|pronom={{PRONOM|x-fmt/413}}
 
|pronom={{PRONOM|x-fmt/413}}
 
}}
 
}}
 
 
'''Windows Script File''' is a file containing scripts in different language (by default [[VBScript]] and [[JavaScript]] are supported, but other languages can be enabled by the user after the installation of their respective interpreters).
 
'''Windows Script File''' is a file containing scripts in different language (by default [[VBScript]] and [[JavaScript]] are supported, but other languages can be enabled by the user after the installation of their respective interpreters).
  
Line 42: Line 41:
 
</pre>
 
</pre>
  
==External link==
+
==External links==
* https://en.wikipedia.org/wiki/Windows_Script_File
+
* [[Wikipedia: Windows Script File]]
  
 +
[[Category:Windows]]
 
[[Category:XML based file formats]]
 
[[Category:XML based file formats]]

Latest revision as of 20:50, 29 March 2017

File Format
Name Windows Script File
Ontology
Extension(s) .wsf
PRONOM x-fmt/413
Released 1981

Windows Script File is a file containing scripts in different language (by default VBScript and JavaScript are supported, but other languages can be enabled by the user after the installation of their respective interpreters).

This is an XML based format and it uses <script> tags to implement each of the script bodies. Often the body will be also wrapped in the CDATA in order to prevent accidents with using XML like tags within the executable code, that would otherwise prevent parsing of the file.

Contents

[edit] Examples

[edit] Example 1 - Hello World

<?xml version="1.0" ?>
<job>
  <script language='VBScript'><![CDATA[

    wscript.echo 'Hello World!'

  ]]></script>
</job>

[edit] Example 2 - Interlanguage Hello World

<?xml version="1.0" ?>
<job>
  <script language='JScript'><![CDATA[
    function helloWorld()
    {
      WScript.Echo("Hello World");
    }
  ]]</script>
  <script language='VBScript'><![CDATA[

    helloWorld

  ]]></script>
</job>

[edit] External links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox