?
Solved

800A0046 Permission denied: "CreateObject"

Posted on 2006-04-18
8
Medium Priority
?
1,802 Views
Last Modified: 2008-03-17
I am having an issue with user accounts running a VB6 application that administrators can run fine.  The server is Windows 2003 with all the updates.  The server is a terminal server box. I have gone through the VB6 code and determined that the error is occuring when trying to create an object.  I have created a VB script to test with.  It is listed below.  I get a 800A0046 permission denied: "CreateObject" error when attempting to run the script as a regular user.  Administrator works fine.  There are many posts here and elsewhere that talk about this issue.  I have looked at all of them and am still stuck.  Any help or suggestions you can give even if they are a repeat of other posts will be greatly appreciated.

Set fs = CreateObject("Scripting.FileSystemObject")
msgbox "done"
0
Comment
Question by:jesimon
5 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16480951
0
 

Author Comment

by:jesimon
ID: 16491705
I have already seen that article.  IIS is not involved.
0
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 16491751
0
 
LVL 3

Accepted Solution

by:
ddepastino earned 1000 total points
ID: 16492056
If you can run it as an Admin and not a regular user you are more than likely fighting a group policy setting and/or file/folder/registry permissions.

The "group policy management console" is downloadable from MS and is a great way to ferret these settings out.  Look for something in the software restrictions policies or "do not run the programs" section.  Maybe try an RSOP for that machine and see if any settings are applied.

Check the permissions on the dll file itself, see if a regular user can browse to it.  The dll file you are calling for that object is scrrun.dll, it sits in C:\Windows\System32 by default.  Put a deny permission on that file and you will get the same error as an administrator.

Another thought is that there may be permissions restricting the user on the registry key with this component, HKEY_CLASSES_ROOT\Scripting.FileSystemObject, or no permissions at all.  Open regedit and deny yourself permissions for that key and yet again you get the access denied message.

Give me a shout back with your test results.
0
 
LVL 4

Expert Comment

by:PeterSinger
ID: 23802585
Note on this issue, for Windows 2000 Servers running citrix or users in terminal service, this problem can happen with two solutions;
1.  Install Wscript 5.6 for W2000
http://www.microsoft.com/downloads/details.aspx?familyid=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en
2.  Grant full user permissions to the regkey HKEY_CLASSES_ROOT\Scripting.FileSystemObject
3.  Make sure that no policies change the permissions on the HKEY_CLASSES_ROOT\Scripting.FileSystemObject key or the problem will return
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

850 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