CreateDirectory fails when called from COM RRS feed

  • Question

  • I have created an IE toolbar.

    COM DLL (IE toolbar component) needs to create folder under APPDATA for any user who uses the toolbar. (each user needs separate data)
    CreateDirectory() returns failure with last error 5 i.e. Access is Denied.

    When user is admin, the folder gets created (without any UAC dialog popping up).

    When user is not admin, access is deined.

    User can create folders, files under APPDATA without issues when done from windows exporer (and also from the same application code when compiled as EXE rather than COM).

    I guess it fails because it is running as COM under IE.
    Am I supposed elevate the object as admin using "Elevation:Administrator!new:"  (but that will prompt for admin password, which is not desired)

    Any suggestions pls?



    Monday, March 10, 2008 11:54 AM