Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > WSC Help, Please....
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 23rd February 13:52
sa
External User
 
Posts: 1
Default WSC Help, Please....



I have a Windows Scripting component that came with a Microsoft Tutorial and
need to know a few things about it...

It looks like an XML file, similar to that following. I'm looking to write a
few components in this manner, but haven't a clue where to start (I have the
programming ability, it's knowing what creates these (.wsc) files and how to
obtain the GUID, etc.,) ... any ideas?

<?xml version="1.0"?>
<component>
<?component error="true" debug="true"?>
<registration
descrption="COMName"
progid="Component.Class"
version="1.00"
classid="{a guid}"/>
<public>
<method name="Send">
<parameter name="Do***ent"/>
</method>
</public>
<implements type="Behaviour" id="Behaviour"/>
<script language="VBScript">
<![CDATA[
function Send(Do***ent)
' some code here that does stuff....
end function
]]>
</script>
</component>

Thanks in advance for any info on this.
  Reply With Quote


  sponsored links


2 23rd February 13:52
torgeir bakken (mvp)
External User
 
Posts: 1
Default WSC Help, Please....



e.g. Windows Script Component Wizard (or just make a copy of an existing one and
modify it)
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp

More here:

Creating Script Components http://msdn.microsoft.com/library/en-us/script56/html/letcreateS.asp

Create your own unique GUID, a vbscript solution using Scriptlet.Typelib:

Set objGuid = CreateObject("Scriptlet.Typelib")

'The guid string has 40 characters, but the last two are nuls.
strGuid = Left(objGuid.Guid, 38)
Wscript.Echo strGuid


Some interesting links:

How to generate a WSC type library file automatically:
http://groups.google.com/groups?selm=3EBD6A07.C56E6B71%40hydro.com

Optional methods to reference the WSC that is not registered from a script:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=uKQPMyT1BHA.2736%40tkmsftngp03

For different methods of code libraries and their pros and cons, you can take a
look here:
http://groups.google.com/groups?selm=3E479EC6.6EFB4ADE%40hydro.com


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter
  Reply With Quote
3 23rd February 13:52
sa
External User
 
Posts: 1
Default WSC Help, Please....


Hey, thanks for the information.

The stuff from MSDN seems to have given me all that I need to know to get
going.

--
Sean
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666