bravew

In my activeX control, it will create a "pref" folder in user profile folder, like c:\Users\guest\AppData\Roaming\MyCompany\pref, to store user's preference setting. It works fine when user log in Vista as administrator, the folder and file are created successfully.

But if user log in as guest, the CreateDirectory function will be failed, ant returns "Access Denied" error.

The same activeX control works fine on Windows XP, no matter user log in as administrator or guest.

Is there any security setting changs in Vista caused this error

My ActiveX control is created by ATL in Visual Studio 2003.net, and this activex is loaded from a IE.

Thanks a lot!



Re: General Windows Vista Development Issues CreateDirectory failed in the ActiveX control when logged in as guest

XycsoscyX

I may be wrong, but AppData is supposed to be a restricted area now on Vista.  If I remember, it was supposed to be restricted before (2K, XP, etc), but never enforced, on Vista it is.  Have you tried it on a standard user account (not admin, but not the Guest account)   You need to have elevated status to be able to write to the AppData area, this means either elevating the application when it's first run, or using an elevation moniker class (and having it create the directory and write into it).

http://msdn2.microsoft.com/en-us/library/ms679687.aspx