Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CreateObject hangs

206 views
Skip to first unread message

Tahl

unread,
Nov 12, 2003, 5:47:45 PM11/12/03
to
I just moved from Windows/ME to Windows/XP Prof. An ASP
script I've been running for my website no longer works.
It basically hangs on the setting of a CreateObject -- the
ASP times out. I've tried it both under PWS and IIS.
I've been thinking it was a security / permissions problem
but everything seems to be turned up. Interestingly, the
same CreateObject works as a VBS and VBScript works within
an ASP. It's just a combo of ASP & that CreateObject.

Your help is appreciated. My website's been down for a
month!

Ray at <%=sLocation%>

unread,
Nov 12, 2003, 6:17:52 PM11/12/03
to
What object are your creating? An FSO? http://www.aspfaq.com/2180

Ray at home

"Tahl" <anon...@discussions.microsoft.com> wrote in message
news:06b601c3a96e$fd432a80$a101...@phx.gbl...

Tahl

unread,
Nov 13, 2003, 9:19:09 PM11/13/03
to
Ray,

The object that the createobject is freezing on is
supplied by a vendor (the software is a COM server
frontend for a home automation controller). The ASP
worked under Windows/ME, it works with other objects (at
least fso) and works with OS-initiated scripts. The combo
of ASP & Windows/XP & this particular COM server is not
working.

Any help is appreciated.

Tahl

>.
>

Ray at <%=sLocation%>

unread,
Nov 13, 2003, 9:51:19 PM11/13/03
to
Are you able to create other objects, like non-third party ones?

Ray at home

"Tahl" <anon...@discussions.microsoft.com> wrote in message

news:3a2001c3aa55$af8ecfa0$a601...@phx.gbl...

Michael Harris (MVP)

unread,
Nov 13, 2003, 10:43:04 PM11/13/03
to
> The object that the createobject is freezing on is
> supplied by a vendor ...


If you bought it from a vendor, they should provide you with technical
support...


--
Michael Harris
Microsoft.MVP.Scripting

Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp

TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942

WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en

krammig

unread,
May 15, 2011, 4:40:01 AM5/15/11
to
Typical Stupid MVP response.

Dave "Crash" Dummy

unread,
May 15, 2011, 7:09:55 AM5/15/11
to

No more stupid than replying to an eight year old posting and not even
offering a solution.

"CreateObject" has to work as a method of the "Server" object.
For example:

Set fso=Server.CreateObject("Scripting.FileSystemObject")

VBScript is very forgiving (sloppy?) in allowing CreateObject to work
without specifying the parent object, WScript. The comparable fully
defined VBScript operation is

Set fso=WScript.CreateObject("Scripting.FileSystemObject")
--
Crash

What happens online, stays online.

Mayayana

unread,
May 15, 2011, 9:02:05 AM5/15/11
to
| VBScript is very forgiving (sloppy?) in allowing CreateObject to work
| without specifying the parent object, WScript. The comparable fully
| defined VBScript operation is
|
| Set fso=WScript.CreateObject("Scripting.FileSystemObject")
| --

Actually, there are two separate CreateObject
methods. Vbscript.dll has it and the WScript
IHost class has a slightly different version, where
an optional second parameter allows the assignment
of a prefix for event subs. The VBScript method is
inherent in any VBScript. The WScript method is a
method of the WScript object. Which is why

Set fso = WScript.CreateObject("Scripting.FileSystemObject")

can work in a script but only

Set fso = CreateObject("Scripting.FileSystemObject")

can work in a webpage or HTA.

I still don't understand how these weird posts show up.
They don't seem to have any purpose as spam. Some
people seem to discover online forums and not realize that
they're viewing a copy of something that happened years
ago. But in other cases, like this one... it's 8 years old and
I can't make sense of either the original post or the response.
The only scenario I can imagine is someone late at night,
drunk and blurry, who decides to go online and swagger
indiscriminately. :)

Dave "Crash" Dummy

unread,
May 15, 2011, 10:09:58 AM5/15/11
to
Mayayana wrote:
> | VBScript is very forgiving (sloppy?) in allowing CreateObject to
> work | without specifying the parent object, WScript. The comparable
> fully | defined VBScript operation is | | Set
> fso=WScript.CreateObject("Scripting.FileSystemObject") | --
>
> Actually, there are two separate CreateObject methods. Vbscript.dll
> has it and the WScript IHost class has a slightly different version,
> where an optional second parameter allows the assignment of a prefix
> for event subs. The VBScript method is inherent in any VBScript. The
> WScript method is a method of the WScript object. Which is why
>
> Set fso = WScript.CreateObject("Scripting.FileSystemObject")
>
> can work in a script but only
>
> Set fso = CreateObject("Scripting.FileSystemObject")
>
> can work in a webpage or HTA.

I didn't know that. Being lazy, I always use CreateObject by itself for
both VBS and HTA/HTM. I just remember from a past lifetime (8 years ago?)
that I had to use the Server object when writing ASP server side scripts.
--
Crash

I always thought Mensa was a Japanese import.

0 new messages