Installing in Document Folder

Actually in wyBuild 2.6.14.0, I can use this Folder: - Common Desktop- Common Start Menu- Common AppData- Current User's AppData- Program files, Common Files folder (32 - 64 bit)- System32 (32 - 64 bit)- Windows Root Drive- Temp folder

Anyway I can't find Document folder. IMO this is a necessary feature for installing/updating Samples files, especially for Vista/Win7 O.S. If you use a subfolder of Program Files, you have not permission to write or modify this sample, so you need to set it.Is there something I'm missing?

Are you saying your app files are sitting in the Documents folder? If so, then just use the "Your program's folder". wyUpdate is smart enough to know that the folder it's sitting in is "Your program's folder". It's also smart enough to detect permissions.

See: Walkthrough for your first time using wyBuild.

Tell me if this helps.

No, sorry I wasn't clear. I was looking how to access %USERPROFILE%\Documents to update App Sample Files (just as Visual Studio does). After your post I find it using "Current User's AppData" folder, adding \Documents\App Samples...Thanks for your replay.

I too have the same problem. saved logs and settings.ini files etc must go to the Documents folder. it is a Windows7 requirement. no changing files allowed in program files(x86) folders. yes appdata\local or roaming is one option, but more common is for applications to install user data to the Documents folder.. for example battlefield2 does this. It is my all time hero. so I will do it like the pros 🙂 c:\users\{username}\documents\EA Games\Battlefield 2\

there is no option for Documents folder in wyBuild.. there is only an option for AppData. I don't want appdata. I want Documents 🙂 in .net its known as SpecialFolder.Personal. I mean, the name says it all doesn't it? why on earth would anyone use the appdata folder? except for files the user are not allowed to touch like ms office.

please help find me a solution?

I'm surprised that you have files that really should be going in the user's personal folders?

If it's application related run-time data on a per-user basis, that's what appdata is for (which is broken down per user, and restricted/roaming). I would argue that BF2 does it wrongly, if it is storing anything there other than files *generated by the user*.

But updates of BF2 or your software are not user-generated files... those are your companies files, and they don't belong in the users _personal_ folders.

---

So to be clear, if you're saving a Word document, or a saved game, those belong in the user's Documents folder (possibly - Word shouldn't be in a special folder within documents, and there is a specific folder dedicated to saved games which nobody seems to have noticed).

But configuration data and application cache data or any other data that needs to be written per-user but is not really something anyone but a power-user should ever directly manipulate should be in appdata\ someplace.

I would argue that BF2 does it wrongly, if it is storing anything there other than files *generated by the user*.

But updates of BF2 or your software are not user-generated files... those are your companies files, and they don't belong in the users _personal_ folders.

Mordachai is exactly right. EA isn't the only company that screws this up (I'm looking at you Adobe & Oracle). At any rate wyBuild is designed for updating & patching files that are identical across all your customers (that is, your app files). Settings files should be generated by your application, not wyUpdate.

Does that make sense, nzboostr?

I agree with you... I think I have a unique situation though that needs access to the Documents folders. (akak User's Personal Data Folder)

I do store program exe in the program files, and the settings and bin files in the appdata area...but I have a further requirement for setting a few files for the users Personal Data Folder too..

I have a folder called Documents\AppName\SavedDataLogs\and I have a folder called Documents\AppName\ProjectFiles\

my app needs to store project files and important user created files. but I create a couple of samples for them to get them started.. i.e \ProjectFiles\SampleProject1 and \SavedDataLogs\SampleLog1.csv and \SavedDataLogs\SampleLog2.csv

See the available folders as per Windows MSI Installer VS2010: http://www.flickr.com/photos/68878960@N06/6263062464/

please can you help me get my sample project files to the users Personal Data Folder?

please help me...

yes, sorry I had it wrong about BF2, it is only screenshots folder in there.

here is further real life examples that installers do to my Documents folder as soon as its installed...

\Documents\Altova\XMLSpy2011\Examples\\Documents\Expression\Expression Design\Samples 2\\Documents\Expression\Blend 4\Projects\Samples\\Documents\OneNote Notebooks\OneNote 2007 Guide\Getting Started with OneNote.one\Documents\Snagit\SampleSNAG.snag\Documents\Visual Studio 2010\Templates\ItemTemplates\Visual C#

oh yes I just remembered, I also have some templates that the user edits.. I want them stored in the Documents folder from the installer too.

heres another exmaple:

\Documents\Camtasia Studio\Custom Production Presets 7.0\Web.xml

OK, we'll add the ability to install to the Documents folder (EDIT: scratch that). It's still not a very good idea, but I see even Microsoft has given up trying to enforce good behavior.

Sorry to beleaguer the point...

Our software does something similar - but doesn't put templates in user folders - rather we store them in Program Files\...

When a user chooses to start a new design from a template (chosen from the generic app-supplied ones, or from a separate store of user-defined ones), then that new project appears in the user's chosen place (usually someplace in My Documents). We maintain a configuration folder for power users to build their own project templates as desired (under appdata).

This maintains a strict separation of app-supplied files and user-saved files.

Also - how do you cope with multiple users having installed the software? How do you expect wyUpdate to update every user account on the machine when only one user is actually running, and he only has permissions for his own My Documents folder?

Yes I see your point, a Personal Data Folder setting is still good to have in some cases.

I will take your points and implement them as best practises.

where does this symlink folder point to in reality on c drive? Seems all apps are using this for there settings, I have hundreds in here. I forgot the cmd to find real folders from symlinks...

C:\Users\All Users\

I've not found a need to know where the symlinks point.

I query the OS for special paths, such as SHGetSpecialFolderPath(), using

CSIDL_APPDATACSIDL_COMMON_APPDATA

etc.

I assume whatever language you're programming with will have either a wrapper for this service, or you can make one. Microsoft goes to a lot of effort to create symlinks in order to support applications that sub-optimally use hard coded paths. But they're not really there to encourage their use - just as a stop-gap and backwards compatibility shim.

Software should always be querying the OS for well-known locations to place things. 🙂----One thing we did end up doing to help our customers - who don't want to have to try digging through paths to find their settings files is to offer a way to jump to their configuration folder in apppaths from our software. "View Configuration Folder" essentially. We just launch explorer "path",/e on it.

I'm apt to agree with Steve (Mordachai). We won't be adding the ability to write to the documents folder. There are too many problems and it's likely to confuse users.

Plus, once the user modifies one of the example files then these files won't be able to be patched. It's easier if you just copy the example files to the current user's documents folder on that user's first-run of your app.