Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Failing Object creation from vbs-script on Windows Server 2008

Reply
 
Old 02-27-2009   #1 (permalink)
Holger


 
 

Failing Object creation from vbs-script on Windows Server 2008

Hello,

I have the following problem, which I have yet posted in Win Server 2008
Application forum. Since I didn't get any answer from there for 2 weeks now I
ask for any help in this forum. So here is what I'm struggling with...

General problem description:
I have the need to instantiate Active-X Objects from a vbs-script on a
Windows Server 2008 system. The script is running fine in general but in
those functions where the script tries to create such an object an error is
shown which indicates insufficient rights.

Background:
With our Setup which installs a Server-Application on a Windows Server 2008
vbs-Scripts are provided which are needed to deliver several tasks to support
the full functionality of the server-application. To achieve this additional
helper dll's are available on the server which provide interfaces that have
to be instantiated by these scripts. The dll's are written in VB6 as Active-X
Objects.

The problem is now that every execution of any of those scripts lead to an
error which indicates that the rights are not sufficient to instantiate an
interface of one of the necessary ActiveX-Dll's. The interfaces usually
provide functionalities like fetching values from the registry and deliver it
in a generic format or access the SCM for special functionalities. This can
be done by script directly but via the dll's this can be provided in a
general way.

Here's a short (simple) code snippet as an example:

Set g_objMdEnv = WScript.CreateObject
"MdEnvironment.ClsMedialEnvironment" )
If (Err.Number = 0) Then
If (g_objMdEnv.Initialize = True) Then
gInstallPath = g_objMdEnv.strInstallPath
'....

When this code-part is executed the error-message says:
Either the dll "MdEnvironment.dll" is not installed or not registered.
Script can
not be executed.

I have checked everything and can ensure that the dll is installed and
registered. So the message doesn't give a hint w.r.t the real problem.

Additionally it has to be mentioned that a special User is created with the
setup who is added to the administrator's group. Although the user is a
member of the Administrator's group an execution of a script under this
account leads to the described error.
Clear, user policies in server 2008 do even limit users within the
Admin-group other than the administrator in there rights. So I thought to
execute the scripts under the administrator account. But even as
administrator that is failing as well.

Questions:
Does anybody have a clue what I have to do to get this going.

Do I have to let the scripts run under a distinct user. If so, how can I do
that in an automated way (run as..., etc.?)
Do I have to set special security policies to give the WScript.exe or even
the vbs-files the right to create objects?
Do I have to install any VB6-extensions or -wrapper to be able to create
objects from out of the scripts?
I'm stucking to this problem several weeks now and couldn't get any helpful
hints in the internet. So I would be very glad to any helpful support here

Thank you very much in advance!
Holger

My System SpecsSystem Spec
Old 03-03-2009   #2 (permalink)
esska


 
 

Re: Failing Object creation from vbs-script on Windows Server 2008

Have you tried to add policy to allow run this script?

Regards,
esska
My System SpecsSystem Spec
Old 03-03-2009   #3 (permalink)
Holger


 
 

Re: Failing Object creation from vbs-script on Windows Server 2008

Thanks for the response,
can you tell me which policies I have to check and how I can check them?

Regards,
Holger

"esska" wrote:
Quote:

> Have you tried to add policy to allow run this script?
>
> Regards,
> esska
>
My System SpecsSystem Spec
Old 03-06-2009   #4 (permalink)
esska


 
 

Re: Failing Object creation from vbs-script on Windows Server 2008

Sorry for delaying message.

Try to add user right in GPO in AD if you use special account dedicate
to send sth in SCM. By the way this is SCCM?
Check if permission under special user account are apropriate to
use .dll.

Try to check if someone had similar problem with running remotely
scripts in this way as you want to do. We had this problem in SCOM -
our workaround doesn't fit to your case.


Regards,
esska
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
how to make my vb script files in windows 2008 server 64 bit VB Script
Error when installing SQL Express 2008 on Windows Server 2008 PowerShell
Windows Server 2008 hosted on Virtual Server 2005 R2 very slow Virtual Server
Bug: Windows Modules Service Is Broken In Windows Server 2008 Beta 3 Web Server Addition. Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46