Solved

Problem to the line

Posted on 2015-02-11
8
73 Views
Last Modified: 2015-03-03
Hi,
Within the Win 7 machine, when running this line

Set objFunc = CreateObject("CSDemo.ComClass1")
...

Open in new window

I get the attached error. Why?
0
Comment
Question by:HuaMinChen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40604940
Here is the attached error
t985.png
0
 
LVL 20

Expert Comment

by:jmcg
ID: 40605016
It looks like our friends over on MS Technet have helped you get past this problem:

https://social.technet.microsoft.com/Forums/windowsserver/en-US/bd0019e0-33a7-4bcc-833f-4dc7c8947bd1/problem-to-call-it?forum=ITCG

I suggest that you request this question be closed.
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40605029
Yes, that is one related thread posted by me.

But now within one Win 7 machine, I have suffered from the problem mentioned.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:jmcg
ID: 40605144
What you've asked here gives less than adequate information about the situation where you encounter the error. I did a Google search to try to get a clue, since it wasn't clear to me what the context of "CSDemo.ComClass1" might be. I have to admire the folks over there for digging into the problem and recognizing what you were trying to do.

To summarize, the message

 Permission denied: 'CreateObject'

is often the result of an unregistered DLL or running under a user with insufficient priveleges to access the DLL. You can run Sysinternals' Process Monitor to try to discern which DLL is involved.

Process Monitor: https://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Additional reference: http://forums.iis.net/t/1174101.aspx
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40605153
Thanks.
I have the relevant Visual studio project, to generate .TLB file, and then register it to Win 7 machine, using these steps

Start --> Run --> comexp.msc
Navigate to Console Root - Componet Services - Computers - My Computer - COM+ Applications.
Right click on 'COM+ Applications' and create New Application.
Follow the wizard carefully. Hit Next. Create an Empty Application. Name it (mycomapp1 for instance). Make sure Server application radio box is selected. Pick the user account based on the requirement. Hit Next. Next. Finish.
Now you have created a COM+ application named mycomapp1.
Now, you need to add individual COM components to it.
Expand mycomapp1 from the list. Right click on Components. Pick New Component. 
Hit Next in the wizard. This next wizard screen is up to you. I would pick 'Install New components' if I haven’t run a regsvr32 or regasm on it. Pick the told or the dll (containing the tlb) file. And go ahead.. That’s how you do it.

Open in new window

and I don't know why on one Win 7 machine, I can call VBS script line

Set objFunc = CreateObject("CSDemo.ComClass1")
...

Open in new window


fine, while on another Win 7 machine, I got the above error, on which the same .tlb file from the same project, had been registered.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 40605215
Time to try Procmon - perhaps on both machines - to see what's different.
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40605263
Any other help to this?
0
 
LVL 20

Accepted Solution

by:
jmcg earned 500 total points
ID: 40606218
You may have reached the limit of what we can do for you. Either there is some difference between the two Win 7 systems you've tried this on that makes the program work on one and not the other,  OR you didn't follow exactly the same steps in each case.

All we  can do is help you learn how to diagnose the problem, since the answer to the question you are asking lies somewhere outside of the information you have provided us. Procmon is a tool that can trace the actions of your process in sufficient detail that you should be able to see where the permissions error arises.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question