How to create a folder in the% allusersprofile% folder during installation using the VS 2003 installation project?

I need to create a folder under "% allusersprofile% / Program Data" during the installation process.

The installation file is created using the VS 2003 installation project, and you can use several well-known folders in it ... but since I do not see any maps for% allusersprofile% or "% allusersprofile% / Program Data".

I thought that creating a "custom folder" (as part of the VS Setup Project) and setting TargetLocation as% allusersprofile% would work, but during installation it says that I do not have permission to this folder (and I have).

Do you know how to target this folder in VS Setup Project?

Also ... I work in Windows XP, so% allusersprofile% maps to "C: \ Documents and Settings \ All Users", but I suppose I should create my own folder in the "Program Data" folder.

In Vista,% allusersprofile% maps to "C: \ ProgramData" and looks correct if I create my folder right there.

Any idea how to target both OSs?

Additional Information: I try to avoid new security features in Vista, where the application cannot write files in the Program Files folder when working as a regular user. Therefore, I need to place writeable files in a "shared" folder that is not in the "per user" folder.

+3
1

... VS Setup Project , , DefaultLocation: [CommonAppDataFolder]\[ProductName]

MS Vista XP.

+6

Source: https://habr.com/ru/post/1707118/


All Articles