Is there a shared folder in Windows to which non-elevated users have write access? Is there a shared folder in Windows to which non-elevated users have write access? windows windows

Is there a shared folder in Windows to which non-elevated users have write access?


"Shared Documents" Directory in Windows XP

C:\Documents and Settings\All Users\Documents

Or,

%ALLUSERSPROFILE%\Documents

Corresponding directory in Vista/7

C:\Users\Public

Or,

%PUBLIC%\Documents

But what you are really looking for, is the KNOWNFOLDERID value of FOLDERID_PublicDocuments (legacy CSIDL_COMMON_DOCUMENTS). The SHGetFolderPath function can then get you the path.

Or an easier VBScript alternative, but I'm not sure how reliable this is across OS versions:

Const CSIDL_COMMON_DOCUMENTS = &h2e Set oShell = CreateObject("Shell.Application")Wscript.Echo oShell.Namespace(CSIDL_COMMON_DOCUMENTS).Self.Path

I think NameSpace doesn't accept that particular constant. So you might be able to take COMMONAPPDATA = &H23 and then use its parent. But that's not very clean or internationalized:

Wscript.Echo oShell.NameSpace(&h23).ParentFolder.Self.Path & "\Documents"

But since you are using Inno Setup, you should really be using the {commondocs} Shell Folder Constant and make it easy for yourself.


The user owns the document folder. Expect files to be copied, moved, deleted or edited with another program if you put something there, because of the visibility to the user.

I suggest you to create a folder under the common application data (CSIDL_COMMON_APPDATA or FOLDERID_ProgramData) in your installer with a security descriptor that allows everyone access.

E.g.

[Dirs]Name: "{commonappdata}\productname";Permissions:everyone-modify;


Would stuff under C:\Users\Public\ qualify for what you need?