swd
swd

Reputation: 248

Windows 2008 vbs script execution error

I am running a very simple vbs file on windows server 2008 32 bit (IIS7 on it) which has following content

set databrowser = Server.CreateObject("myDLL.DataBrowser")

it gives me following error,

Microsoft (R) Windows Script Host Version 5.7 Copyright (C) Microsoft Corporation. All rights reserved.

C:\Users\Administrator\Documents\test.vbs(1, 1) Microsoft VBScript runtime error : Object required: 'Server'

I am running as cscript.exe test.vbs

what could be the reason for this?

Upvotes: 1

Views: 1254

Answers (1)

Ofer Zelig
Ofer Zelig

Reputation: 17508

Use Wscript.Createobject instead of Server.CreateObject.

See: What's the Difference between WScript.CreateObject, Server.CreateObject and CreateObject?

Upvotes: 4

Related Questions