Common Practice For Storing Application Data Files

During my application development targeting for XP and Linux time, I will store my application data files (Files where user may create, modify, rename, delete...) same path as my application directory. For instance, if my application is installed in :-
C:\Program Files\MyApp\MyApp.jar
All my application data files will be located in
C:\Program Files\MyApp\Config\ directory.
This works quite well until Vista introduce UAC. Vista will not allow write opration to C:\Program Files\MyApp\Config\ folder (Config folder is being created during installer execution). However, to support legacy application, Vista use a workaround (Virtualization) for application to write. For example, MyApp.jar want to perform write on
Real path :-
C:\Program Files\MyApp\Config
Vista will redirect it to :-
Virtual path
C:\Users\<account>\AppData\Local\VirtualStore\Program Files\MyApp\Config
Please refer to the links for more detail
[http://www.codeproject.com/KB/security/acl_common_data.aspx?display=Print]
[http://www.codeproject.com/KB/vista-security/MakingAppsUACAware.aspx]
However, this introduce several additional problems [http://support.microsoft.com/kb/927387]
May I know what is the common practice for storing an application data files? The below are my several thoughts
(1) Writing to
* Windows XP - %systemdrive%\Documents and Settings\All Users\Application Data
* Windows Vista - %systemdrive%\ProgramData
* Windows 2000 - %systemdrive%\Documents and Settings\All Users\Application Data
* Windows Server 2003 - %systemdrive%\Documents and Settings\All Users\Application Data
* Windows 98 - %systemdrive%\Windows\All Users\ Application Data
which we may retrieve through "CommonApplicationData", using the API function SHGetFolderPath. However, how can we do that in Java? How to make compatible with Linux?
(2) Writing to user home directory through "user.home" properties. Create a folder .MyApp and write the application data on it.
Any input and suggestion are welcomed.
Thanks!
cheok

>
...I will store my application data files (Files where user may create, modify, rename, delete...) same path as my application directory. >See [Store Application Settings and Components|http://sdnshare.sun.com/view.jsp?id=2305] for code that will put the required parts in a suitable sub-dir of user.home.

Similar Messages

  • Best Practice for Storing Spatial Data in Multiple Projections?

    From what I've been able to determine MS SQL can't do reprojections is that correct? Assuming it is, the state of Washington requires that our GIS data be managed in Washington Stat Plane South
    but for our web mapping sites need the data in Web Mercator.  Is it OK then to have two geometry columns in a spatial enabled table, say a county table, one in WSPS and the other in WM? 
    I’m coming at this from a 30 year background in GIS using ESRI software. 
    Usually we would store the shape / geometry in one projection and project it to other on the fly when needed. 
    That way there is only one definitive source.  I don’t see a way to do this in MS SQL.

    Hi Scott.
    Storing two columns of spatial data is fine in SQL Server. And you are correct that there is no built-in reprojection in SQL Server, most folks do that as part of data loading. There was talk of porting parts of ogr2ogr to SQLCLR, but I don't think anyone
    did that.
    Cheers, Bob

  • Best/Easiest Practice for Distribution of Webhelp files for Fat(ish) Client Application

    So another in my long line of questions in trying to change the implementation of the help systems at my new employer.
    So, the pressure is to convince the existing guard to toss out the old method and go with a new method... One of the issues has come up for CSH Webhelp (via RH10)...
    Apparently, in the old method (where every help topic was it's own CHM - no, I'm not kidding).  They kept it that way so that any time a help file was updated, they could just send out that one chm to update that one topic.
    Now they are worried that if we switch to webhelp using topics in one single big project that we can't just send out a single updated file any more...
    So I'm trying to get ammunition as to how updates to the help can be distributed without it being a big hassle...
    We do have small updates that go out about every week, and they are afraid that going to the webhelp (1 project with lots of topics) method will require more time and effort for the techs because they will have to complete the update of a huge help system every time.
    One solution we have suggested is that we only update help files on major releases and add any changes to help procedures in the Release Notes or in a separate PDF and also include a note that the help files "will be updated to reflect this change in the XX/2015 XYZ Release).
    Does ANYONE have any other ideas of how distribution could be done efficiently so that we don't have to continue this "project per topic" fiasco?
    HELP!!! PLEASE!!!!

    Amebr - you hit the nail on the head... i want to apologize to everyone for all this mass hysteria...but this has been a freaking rollercoaster... one day they are happy with the plan, the next day they decided they want to complicate it more... So now my job is to find out how viable and how tricky and perhaps how dangerous it will be to send out JUST the files that have been changed.  Especially for CSH! 
    Anyone have any experience with this or have any advice?  Peter?  I suspect you might know how this might work... are they any pitfalls to watch out for.. I just have this fear of sending out a few files from an entire project... Altho, it appears when I publish, ONLY the files that have been edited in some way show a new date.. that includes non-topic files - so i'm assuming sending all those will keep the TOC, Index, and Search features working properly... as well as incoming and outgoing links from an edited topic?
    Another question would be how to handle new images in a project... as the image folder tends to be the largest, i don't want to have to send the entire image folder... Thoughts...????  Advice?  Jeff? Peter? Amebr? Bueller?  Bueller?  Bueller....?
    THANKS!Best/Easiest Practice for Distribution of Webhelp files for Fat(ish) Client Application
    OH... and Jeff... my apologies for the misnomer of using the term "Fat-ish" client in reference to this... I totally misspoke and should have said Mobile App... but in my mind, any time you have to download something to use it, it's a fat client... sorry!  :-/

  • Best Practice for storing PDF docs

    My client has a number of PDF documents for handouts that go
    with his consulting business. He wants logged in users to be able
    to download the PDF docs for handouts at training. The question is,
    what is the 'Best Practice' for storing/accessing these PDF files?
    I'm using CF/MySQL to put everything else together and my
    thought was to store the PDF files in the db. Except! there seems
    to be a great deal of talk about BLOBs and storing files this way
    being inefficient.
    How do I make it so my client can use the admin tool to
    upload the information about the files and the files themselves,
    not store them in the db but still be able to find them when the
    user want's to download them?

    Storing documents outside the web root and using
    <cfcontent> to push their contents to the users is the most
    secure method.
    Putting the documents in a subdirectory of the web root and
    securing that directory with an Application.cfm will only protect
    .cfm and .cfc files (as that's the only time that CF is involved in
    the request). That is, unless you configure CF to handle every
    request.
    The virtual directory is no safer than putting the documents
    in a subdirectory. The links to your documents are still going to
    look like:
    http://www.mysite.com/virtualdirectory/myfile.pdf
    Users won't need to log in to access these documents.
    <cfcontent> or configuring CF to handle every request
    is the only way to ensure users have to log in before accessing
    non-CF files. Unless you want to use web-server
    authentication.

  • When will Reader 9's Runtime error for redirected Application Data be fixed??

    Has anyone heard when Adobe will fix Reader 9's Runtime error for redirected Application Data??  It's still happening with 9.1.3 for only users who have their Application Data folder redirected via Group Policy.
    It's been going on for some time, as evidenced by the following link, and my own personal pain fighting this
    http://forums.adobe.com/thread/391738?start=100&tstart=0

    Also posted here: http://forums.adobe.com/thread/391738
    I haven't read through all of the posts, but the general consensus I have is that the issue is in fact related to the redir
    ection of the Application Data folder. The main issue being that the use of a UNC path causes the error described, with some mention to explicit user permissions on the root of the folder path.
    I was just recently made aware of this issue in our environment. Apparently we've held off upgrading to Adobe 9.x because of this issue. After a little research, it was apparent that simply modifying the default Folder Redirection policies is not possible because the use of a mapped drive is not supported.
    I haven't had a chance to test this yet, and may not be able to for some time, so I thought I would share this in case someone else might be able to test. The idea being to simply use a custom ADM file to force the redirection of certain profile folders. Again, I haven't tested this using a mapped drive in the path, but I have successfully used the same settings below to redirect other folders not available by default in Group Policy.
    1) Copy the text between ----- Start of ADM ------ and ----- End of ADM ------ and paste it into a text file.
    2) Rename the .txt to .adm.
    3) Load the ADM template into a GPO.
    4) Right click "USER Custom Settings", select "View", select "Filtering" and uncheck the option "Only show policy settings that can be fully managed".
    5) Configure the "Redirect Application Data" option as enabled, and enter a mapped drive path.
    6) Test.
    I'm interested to hear if this is a viable solution or not.
    ------ Start of ADM -----
    CLASS USER
          CATEGORY "USER Custom Settings"
                CATEGORY "Folder Redirection Settings"
                      POLICY "Redirect My Documents"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Personal"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectHistory
                      POLICY "Redirect Application Data"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "AppData"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectHistory
                      POLICY "Redirect Cookies"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Cookies"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectCookies
                      POLICY "Redirect Favorites"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Favorites"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectFavorites
                      POLICY "Redirect History"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "History"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectHistory
                      POLICY "Redirect Recent Documents"
                      KEYNAME
    "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
                      EXPLAIN "By default files are stored as part of the
    user's profile.\n\nConfigure alternative locations here."
                      PART "Redirect to" EDITTEXT
                            VALUENAME "Recent"
                            MAXLEN 255
                            DEFAULT ""
                            EXPANDABLETEXT
                      END PART
                      END POLICY ; RedirectRecent
                END CATEGORY
          END CATEGORY
    ------ END of ADM -----

  • Is it common practice for Verizon to park in a private driveway to perform services?

    A verizon Vehicle with the plate {edited for privacy} parked in one of my parking spaces for approximatley 4 hours today (he's still there as I'm typing this). Is it common practice for a represenative to park in another person's private driveawy to perform services for other consumers? 
    My son had no where to park, and he's still waiting for your rep to leave. 
    I want to file a complaint against this worker. 
    I can't even speak with him or her because they aren't in their car. 
    Is Verizon above the law? Can you guys just legally park whereever you want to? Serious question, maybe there's something you know that I don't.

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions. To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe".
    Please keep all correspondence regarding your issue in the private support portal.

  • JCo connection for the application data

    Dear All,
    Now, we configure BP for MSS. When we set JCo connection for the application data, from this link  http://help.sap.com/saphelp_erp2005/helpdata/en/29/d7844205625551e10000000a1550b0/frameset.htm we selected the method "Ticket".
    When we run the page in "Team" area, we found some errors as follow:
    - You do not have the authorization to start service sap.com/pcui_gp~isr/IsrStatusoverview
    - You do not have the authorization to start service sap.com/mssreccand/CandidateStatusOverview
    - Pages about "Employee Information" display Blank iViews.
    But if we set JCo connection for application data by using "User/Password" method (UserID have "SAP_ALL" profile in back-end system), the application work fine.
    Kindy advise us which method should be used to set JCo connection (Ticket or User/Password).
    If the method should be "User/Password", please advise authorization and user type for UserID that be used to map JCo connection.
    Thank you very much,
    Anek.

    Hi,
    Go through the contents in,
    http://help.sap.com/saphelp_ep60sp2/helpdata/en/8f/67d27676ace84080964d4c4223bb3c/content.htm
    Hope this helps !
    Regards
    Srinivasan T

  • Best Practice for Initial Load Data

    Dear Experts,
        I would like to know the best practices or factors to be concerned when performing initial load
    For example,
    1) requirement from business stakeholders for data analysis
    2) age of data to meet tactical reproting
    3) data dependency crossing sap  modules
    4) Is there any best practice for loading master data?

    HI ,
    check this links
    Master Data loading
    http://searchsap.techtarget.com/guide/allInOne/category/0,296296,sid21_tax305408,00.html
    http://datasolutions.searchdatamanagement.com/document;102048/datamgmt-abstract.htm
    Regards,
    Shikha

  • Best practice for putting binary data on the NMR

    Hi,
    We're creating a component that will consume messages off the NMR, encode them, and subsequently put them back on the NMR. What's the best practice for sending binary data over the NMR?
    1. setContent()?
    2. addAttachment()?
    3. setProperty()?
    If NormailzedMessage.setContent() is the desired approach, then how can you accomplish that?
    Thanks,
    Bruce

    setContent() is used only for XML messages. The recommended way to accommodate binary data is to use addAttachment().

  • Whenever i try to download a rather large file i continue to get the "could not read source file" error. Tried new profile, uninstalling and looking for the compreg.dat file to delete nothing is working. Please help

    whenever i try to download a rather large file i continue to get the "could not read source file" error. Tried new profile, uninstalling and looking for the compreg.dat file to delete nothing is working. Please help

    Did you reinstall CS3 after CC?
    For that matter, doing an in-place upgrade on the OS is always a gamble with Adobe programs. Reinstalling all the versions you need, in order, would probably solve your problem.
    And you shouldn't need to save as IDML after opening the .inx in CC.

  • Best practice for storing/loading medium to large amounts of data

    I just have a quick question regarding the best medium to store a certain amount of data. Currently in my application I have a Dictionary<char,int> that I've created, that I subsequently populate with hard-coded static values.
    There are about 30 items in this Dictionary, so this isn't presented as much of a problem, even though it does make the code slightly more difficult to read, although I will be adding more data structures in the future with a similar number of items.
    I'm not sure whether it's best practice to hard-code these values in, so my question is, is there a better way to store this information, retrieve and load it at run-time?

    You could use one of the following methods:
    Use the application.config file. Upside is that it is easy to maintain. Downside is a user could edit it manually as its just an xml file.
    You could use a settings file. You can specify where the setting file is persisted including under the user's profile or the application. You could serialize/deserialize your settings to a section in the settings. See
    this MSDN help section
    on details abut the settings.
    Create a .txt, .json, or .xml file (depending on the format you will be deserializing your data) in your project and have it be copied to the output path with each build. The upside is that you could push out new versions in the future of the file without
    having to re-compile your application. Downside is that it could be altered if the user has O/S permissions to that directory.
    If you really do not want anyone to access it and are thinking of pushing out a new application version every time something changes you could create a .txt, .json, .xml file (depending on the format you will be deserializing your data) just like the previous
    step but this time mark it as an embedded resource in your project (you can do this in the properties of the  file in visual studio). It will essentially get compiled in your application. Content retrieval is outlined in
    this how to from Microsoft and then you just deserialize the retrieved content the same as the previous step.
    As far as formats of your data. I recommend you use either XML or JSON or a text file if its just a flat list of items (ie. list of strings). Personally I find JSON much easier to read compared to XML and change and there are plenty of supported serializers
    out there. XML is great too if you need to be strict as to what the schema is.
    Mark as answer or vote as helpful if you find it useful | Igor

  • Best practices for creating application schema

    All,
    Can anyone recommend best practices (or pointer to a url) for creating application schema. A novice installer created a schema and the tablespace ran out of disk space in 2 days and the system came to a halt at a production site. The tablespace was created with one datafile and with MAXSIZE specified. I am looking for Do's and Dont's on production system.
    Thanks for any help,
    Vissu

    I'm not sure that you can boil this down to a "Do's and Don'ts" list unless you want to get overly general...
    For example, do make sure that you provision space appropriately. "Appropriately" however, is going to be radically different in different environments. Some shops set all their data files to autoextend in production and monitor utilization at the OS level. Other shops specify exact file sizes and monitor utilization at the Oracle level. Each approach has its own advantages and disadvantages, you just need to make sure that your application uses the same approach that every other application in the organization uses.
    Do have an idea about the space utilization of the application, but don't go overboard. Running out of space in 2 days means someone failed to do a basic analysis. On the other hand, I've seen people spend way more time than they should making 5 year projections based on some relatively soft assumptions and getting worried about internal overheads that were much smaller than the error bars in their baseline estimates. Of course, the precision necessary also depends on the implications-- a 20% error in a multi-TB data warehouse is going to have a lot more impact than a 20% error in a 20 GB OLTP application.
    Justin

  • Best practice for migrating eLearning data from Sol Mgr 3 to 4?

    Greetings,
    What is the recommended method for moving eLearning data when migrating from Solution Manager 3 to version 4?
    Thanks in advance,
         Ken Henderson

    948115 wrote:
    Dear All,
    This is Priya.
    We are using ODI 11.1.1.6 version.
    In my ODI project, we have separate installations for Dev, Test and Prod. i.e. Master repositories are not common between all the three. Now my code is ready in dev. Test environment is just installed with ODI and Master and Work repositories are created. Thats it
    Now, I need to know and understand what is the simple & best way to import the code from Dev and migrate it to test environment. Can some one brief the same as a step by step procedure in 5-6 lines? If this is the 1st time you are moving to QA, better export/import complete work repositories. If it is not the 1st time then create scenario of specific packages and export/import them to QA. In case of scenario you need not to bother about model/datastores. keep in mind that the logical schema name should be same in QA as used in your DEV.
    Some questions on current state.
    1. Do the id's of master and work repositories in Dev and Test need to be the same?It should be different.
    2. I usually see in export file a repository id with 999 and fail to understand what it is exactly. None of my master or work repositories are named with that id.It is required to ensure object uniqueness across several work repositories. For more understanding you can refer
    http://docs.oracle.com/cd/E14571_01/integrate.1111/e12643/export_import.htm
    http://odiexperts.com/odi-internal-id/
    3. Logical Architecture objects and context do not have an export option. What is the suitable alternative for this?If you are exporting topology then you will get the logical connection and context details. If you are not exporting topology then you need to manually create context and other physical connection/logical connection.
    >
    Thanks,
    Priya
    Edited by: 948115 on Jul 23, 2012 6:19 AM

  • Best practices for storing logon/password info

    I'm curious what are the best practices and/or what other organizations are using to store the logon/password information that needs to be shared by several users. This could be, for example, RFC logon that is used in several interfaces; FTP logon, etc. Such information may need to be accessible to all the developers yet should be stored safely.
    In my previous assignments this was usually managed by a Basis admin, but we don't have a designated admin here so it needs to be handled by developers. A suggestion has been made to store it in a Z table in SAP, but we're trying to explore other options.
    Thank you.

    The SecureStore is a protected area only accessible via the SAP kernel functions. It is SAP standard (used by transactions such as SM59, etc) and is accessed by the system at runtime.
    But if you only want these connections to be temporarily available (so, without stored logon data) then there is a guru solution you might want to consider for those access in ABAP systems.
    For general password management of generic users or large numbers of them you can alternately also consider a [password-vault|http://www.google.com/#hl=de&source=hp&biw=1276&bih=599&q=password+vault&rlz=1R2ADSA_deCH392&aq=f&aqi=g3&aql=&oq=&gs_rfai=&fp=ec103d87630c3cc0] . These can however typically not be accessed at runtime.
    Shall I move this to the security forum, ABAP general, NW Admin or is someone still going to get themselves Guestified here? 
    Cheers,
    Julius

  • Best Practice for storing user preferences

    Is there something like best practice or guideline for storing user preferences for desktop application such as window position, layout setting, etc. ?

    java.util.prefs

Maybe you are looking for

  • How to batch change all iPhoto imported movies and keep them in same event?

    I have several years of AVI movies that won't be read in iMovie 08 but can be viewed and played using QT from iPhoto 08. Anybody know how i can batch convert the entire library of movies in my iPhoto library to mac happy format and keep their creatio

  • Consignment return showing on billing due list

    Hello, We are having an issue where a very old sales order/delivery is showing up on our billing-due list.  This was a consignment return for zero dollars so there are no credits or billing involved.  How do we remove this from the billing due list?

  • SAP BRIM: SAP CC + SAP CI * chargeable items rated in output files in the same instance

    Hello Experts, I'm contacting you just to ask if it is possible and how should I configure SAP CC (Convergent Charging) and Sap CI (convergent invoicing) to reproduce the following scenario: Nowadays having two SAP CC different instances I'm able to

  • Customising help

    Is there any way to programmatically insert/update the page/item level page text rather than manually typing it in at design time ? We want the end users to be able to modify the help text to reflect their inhouse business rules. thanks

  • Bigger text in ABAP webdyn

    how to make bigger text in ABAP web dynpro