.WSC - File Extension for Windows Script Component Files

Q

What is WSC? WSC, short name for Windows Script Component, is used as the file extension for Windows Script Component files. .WSC files are XML files that can be opened by XML editors. See the sample .WSC file included below.

✍: FYIcenter.com

A

File Extension: .WSC

MIME Type: text/xml

File Content: Windows Script Component

.WSC files are Windows Script Component files which contain script codes to build COM components in XML format. Here is a sample .WSC Windows Script Component file that defines a simple COM component:

<?xml version="1.0"?>
<component>

<registration
    description="First"
    progid="First.WSC"
    version="1.00"
    classid="{d0ccb637-bd0c-4c90-a4bd-7473f499d35a}">

    <comment>
	This makes the messagebox pop up on registration and unregistation.
    </comment>

</registration>

<comment> The methods and properties to expose to the data consumer.</comment>
<public>
    <property name="YourName">
	<get internalName="hiddenGetProperty"/>
	<put internalName="hiddenSetProperty"/>
    </property>
    
    <method name="SayHello">
    </method>
</public>

<comment> The code that implements the functionality of the component.</comment>
<script language="PerlScript">
<![CDATA[
    use vars qw($YourName_Property);

    sub hiddenGetProperty {
	return $YourName_Property;
    }

    sub hiddenSetProperty {
	my($param) = shift;
	$YourName_Property = $param;
    }

    sub SayHello {
	return "Hello $YourName_Property!";
    }
]]>
</script>

</component>

.WSC Windows Script Component file sample: Click sample.wsc to download.

Since .WSC files are in XML format, you can use any XML to create or modify them. But you can also use Windows Script Component Wizard to automatically create .WSC file.

u

For for information on how to use .WSC Windows Script Component files, see links below:

2020-12-10, 10978👍, 1💬