I am trying to get a Windows Script component running on a development platform and x64. Works great on x32 bit. But it doesn't seem to work, I have the same problem with both JScript and VBScript.
The simplest wsc component is possible here. All that he does is pop up "Hello" in the message box. If you save the snippet below to a file called test_lib.wsc, you can right-click it and register it. Now it is available as a COM component.
<?xml version="1.0"?>
<component>
<?component error="true" debug="true"?>
<registration
description="Test Script Library"
progid="TestScript.Lib"
version="1.00"
classid="{314042ea-1c42-4865-956f-08d56d1f00a8}"
>
</registration>
<public>
<method name="Hello">
</method>
</public>
<script language="VBScript">
<![CDATA[
Option Explicit
Function Hello()
MsgBox("Hello.")
End Function
]]>
</script>
</component>
Then create the following vb-script sample and save it in a file called test.vbs
dim o
set o = createobject("TestScript.Lib")
o.hello()
test.vbs cscript wscript, .
"C:\test.vbs(3, 1) Microsoft VBScript: ActiveX :" TestScript.Lib "
32- XP.
- - , ?
Noel.