800A0046 Permission denied: "CreateObject"

Posted on 2006-04-18
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"
Question by:jesimon
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]

    Author Comment

    I have already seen that article.  IIS is not involved.
    LVL 23

    Expert Comment

    LVL 3

    Accepted Solution

    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.
    LVL 4

    Expert Comment

    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
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    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…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now