![]() |
|
|||||||
| Register | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Registered Member
Join Date: May 2002
Posts: 2
|
OK don't flame me...
I'm trying to write a script that uses the following code Dim winsock, WScript set winsock = Wscript.createobject("MSWINSOCK.Winsock", "winsock_") winsock.Remotehost = "127.0.0.1" winsock.RemotePort = 695 more script..........bla....bla...bla Heres the problem, If I execute the the vbscript by dubble clicking on it it runs fine, but if I try to have netstumbler call it I get an error "Microsoft VBScript runtime error: Object required: 'Wscript'" help a newbie out PS I have .NET 2003 with WSH installed |
|
|
|
|
|
#2 (permalink) |
|
Registered Member
Join Date: Feb 2004
Posts: 27
|
You don't need to say
WScript.CreateObject You can just say CreateObject When you double click a vbs file a program called wscript.exe runs it, that's why it works when you double click it, because you are simply asking WScript namespace to call CreateObject. In NS WScript namespace doesn't exist. But you don't need it. Just curious, why the second argument "winsock_". Second argument is usually the name of the remote computer you wish to create the instance on. Is this your intention? Otherwise you don't need the second arg either.. -niko Last edited by nikolatesla20 : 03-04-2004 at 10:48 PM. |
|
|
|
|
|
#4 (permalink) | |
|
Registered Member
Join Date: Jun 2004
Posts: 13
|
ws script
Quote:
Does vbs work for you?What interesting you have written? |
|
|
|
|