System property that represents a user's My Documents folder

Hi! What is the System property that points to a user's My Documents folder on Windows platform? Thanks!

>
Define "only".
I would imagine that there is a highly finite number
of file configurations on all Win OS 9x onwards and
System.property("os.name"); would resolve this with
only a few additional lines of code.
Actually, that's not true either... In Win 2K and above, the My Documents folder can be located in an almost infinite number of places, that are then mapped to a virtual My Documents folder.
This can include network locations (in the case where a user's Windows profile is stored on a central server instead of on each workstation), or with phyisical names other than "My Documents". For example, when using Win XP to connect to an Active Directory hosted on a Win 2003 server, the phyiscal location of the My Documents folder is actually named with the user's name - i.e. "John's Documents".
Even better, the name that is selected is not always the Windows login name - but could also be the alias that the user has created for themselves.
Anyway, here's the point: If you want your code to work on all Win platforms (today and in the future), you have to get the directory the way the Windows API says you have to get it: using the SHGetSpecialFolderLocation function. If you want to try to hack something together, then it might work in a lot of cases for a little while. But it is going to break at some point. Personally, if I know a piece of code I'm writing is going to cause my app to break in the future, I write it differently so that won't happen - but that's just me.
There's probably a way to find this info in the registry as well, but there is no guarantee that the location this information is stored in the registry will remain the same - if it changes, then the SHGetSpecialFolderLocation implementation will change.
- K

Similar Messages

  • How do I remove Sharepoint Users in my Documents Folder?

    I have a user in my permissions for my Documents folder and it looks like this:
    com.apple.sharepoint.grou......
    I am trying to run software that is failing at launch and the creators think it is because of this... it won't let me remove users or add.
    Ultimately I need to get my Documents permissions back to default... and all the files in the folder as well.
    HELP!

    If "Open" and "Open Containing Folder" in the right-click context menu in the Download Manager window are grayed then that means that the file is no longer in the original download location and they may have been removed by Anti-virus or cleanup software.
    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.

  • Giving each User their own document folder

    I have a requirement in a Sharepoint 2013 setup wherein I've to give access to external users to a document library. Each User will have a folder by their name, and would be allowed to ACCESS their folder ONLY. They are not even allowed to see each other folder
    names. They can anytime upload additional or delete the existing documents. External Users are setup using FBA.
    Inside the network, there is a Windows user who'll have access to all the folders and documents of that library. I don;t think standard document library can handle this since there is no "Deny View" Permission in Sharepoint.
    Sharepoint Folks - Please guide what will be the best way to handle this kind of requirement.

    you can do this by breaking the permissions of your document library.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/0c6e0dd7-af51-4d99-960f-c510169da55b/folder-permission-in-sharepoint-foundation-2010?forum=sharepointadminprevious
    http://www.youtube.com/watch?v=lFG9Disd3SU
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
    No, this does not help. I want to hide the folders and the documents which does not belong to other users.

  • OC4J 9.0.4 System Property Configuration

    Hi,
    I am relatively need to the J2EE world and am working with OC4J 9.0.4 Stand Alone server.
    I am trying to setup a system property that I can read using the System.getProperty() method in one of my class files.
    example: systemEnv=System.getProperty('NEARMISS_PROPERTIES");
    Is there a configuration file for OC4J in ../j2ee/home/config where I can set it up so that it is globally available or just available to my container context?
    I was able to get it to work by using the -D option on the java startup command for OC4J but do not want to do it that way in the real DEV server. Its ok for my PC to intially develop but not for DEV/QA/PROD of course.
    example: java -DNEARMISS_PROPERTIES="D:\\J2EE Projects\\System Config Files" -jar oc4j.jar
    Thanks for any help you can provide.
    Dean Cyril Wood

    Can you try the "-updateConfig" option of admin.jar?
    java -jar admin.jar ormi://localhost admin Matrox -updateConfigTo my vague memory, the "-restart" option does not necessarily implies reading the config files again.

  • Setting a system.property twice in a same JVM

    Hello,
    I have got a problem concerning the setting of a system property.
    When I run a first time my program I test a case by setting a system property, that works fine.
    Now I want to change the same property in the same JVM by doing:
    System.setProperties("key","oldvalue");
    System.getProperties("key", "oldvalue"); //I obtain oldvalue
    System.setProperties("key","newvalue");
    System.getProperties("key", "newvalue"); //I obtain newvalueBut apparently it seems the JVM doesn't take the new value of the property even if the getProperty() give me the new value.
    So my question is can I change several times the value of a same property in the same JVM or it is technically not possible?
    I read the tutorial about System and it says :"The setProperties method changes the set of system properties for the current running application "
    Thank you for any assistance

    And I say that it apparently does not work because I run some tests
    to find why my results were wrong even if in setting a new property.Well, one of those tests might be to just check the changed property right after the change.
    Which you do in your code.
    And which results in a correctly changed property, doesn't it?
    So, what are those other tests you've performed, what was it that you've expected them to do and what did they actually do?
    So it is just because if you have initialized the system property once you
    cannot do it again or you have to record the new value in a file and then restart
    your application by take the value of the system property inside the previously created fileNone of both. You can just change the system properties (just like every other properties) and the changes take place immediately (unless you run multithreaded, in which case you should put the "setproperty" stuff into a synchronized block or method.
    Of course, if you try and change the properties of your operating system, then that's different. But I won't start and guess around about what exactly you try to do and what does not work.
    Again, try to state plainly
    1.) what you programmed, perhaps with some line of code
    2.) what you expected your code to do
    3.) what happened instead
    Provided with that information, forum readers should be able to provide you with some help.
    -T-

  • Creating native MSI bundle that is "per user"-based (not "system"-based)

    I am trying to collect all information in order to create a native MSI bundle that is "per user" based - but failed.
    This means:
    (.) The MSI should install into the user's local directory
    (.) There should be no admin permission required
    When using the default <fx:deploy ... nativebundle="msi" ...>-ANT-element, then the MSI is created "system wide" based, installing in "/Prorgram Files" and requiring an admin permission.
    In the Oracle docu (http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm) there is no concrete hint how to create "per user" based MSI files. Maybe, someone already has done this and could tell the imprortant steps...
    THANKS!
    PS: I know - using the .exe-bundling with Inno Setup will create "per user" based installers by default, but I do not want to use .exe if possible

    Try
    <fx:preferences install="false"/>
    although the parameter name doesn't give much indication that it's system vs per user :)
    I checked that the MSI bundler code and it should honor this.
    Let me know if this works (I don't have time to try myself today and am leaving on Holidays for a week so won't be able to check until I'm back).
    Mark

  • Rating system that limits each user to one vote per item

    I am creating a PHP-based website where people can upload
    content and other users can rate the content. How do I create a
    rating system that only accepts one vote per registered user for
    each submission?

    On 04 Apr 2007 in macromedia.dreamweaver, AngryCloud wrote:
    > When a user votes on a certain picture, where is the
    information
    > stored that says that this specific user voted on this
    specific
    > image?
    In the table you create joining the two:
    USERTABLE
    Userid > Key field
    Username
    PICTURETABLE
    Pictureid > Key field
    Picturename
    USERPICTURE
    Userid > Foreign Key
    Pictureid > Foreign Key
    PictureRating
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • System msg that are visible for all users

    Hi
    Does any one know how to create a system msg, that users logged on to ex. /rep, /rwb will see, in ABAP i know you can use SM02, but how to do it in J2ee im lost.
    Thanx for your info.
    //Tord

    Hi,
    AFAIK, you can set the System Msg for SLD (SLD -> Administration -> System Message), but not for IR/ID.
    Yep, as mentined by Ricardo and there is one more option "Display System Message".. it means, we can create system messages.. i guess try to look in VA, may be u may get an option to create this there.
    Message was edited by:
            Vijaya Lakshmi MV

  • Is their a way to set system property in weblogic console

    Hi WL USERS
    Is their a way to set system property in weblogic console ie (http://localhost:8080/console) ? if yes, can we access that property in code using System.getProperty()?
    Regards
    vishy

    Yes, It is Possible.
    Please check the Option-1). Mention in the Following Link: http://weblogic-wonders.com/weblogic/2010/03/26/nodemanager-based-managedservers-setting-mem_args/
    Here i tried to set a Custom Property "*-Duser.dir=E:/MyDirectory*" through the Admin Console.
    NOTE: Setting any Option like JAVA_OPTIONS/CLASSPATh etc through Admin Console will work only when you start your Servers using the NodeManager. It means when you start your ManagedServers through AdminConsole...or Using nodeManager based WLST scripts.
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic/ (WebLogic Wonders Are Here)

  • Backup message error -SAP system is running or SAP user is connected to dat

    Hello ..
    when the backup started i got this message error ..before starting the backup, the shell shutdown the sap system but below message was showed
    BR0262I Enter database user name[/password]:
    BR0055I Start of database backup: bedvugxg.aff 2010-08-08 05.31.48
    BR0484I BRBACKUP log file: /oracle/AAA/sapbackup/bedvugxg.aff
    BR0477I Oracle pfile /oracle/AAA/102_64/dbs/initAAA.ora created from spfile /oracle/AAA/102_64/dbs/spfileAAA.ora
    BR0068E SAP system is running or SAP user is connected to database AAA - database cannot be shut down
    BR1025I Please shut down SAP system first or use the 'offline_force' option
    BR0056I End of database backup: bedvugxg.aff 2010-08-08 05.31.48
    BR0280I BRBACKUP time stamp: 2010-08-08 05.31.49
    BR0054I BRBACKUP terminated with errors
    [Major] From:  "OMNISAP" Time: 08/08/10 05:31:49
    BRBACKUP /usr/sap/AAA/SYS/exe/run/brbackup -t offline -d util_file -c -m all -u hpbkup/******* returned 3
    i am new on this, what should i review into the db?
    Regards and thanks in advance
    Dma.

    Hello Daniela,
    you try to perform an offline backup (which is a very uncommon way nowadays) and your SAP system is not down.
    This is also described in the official documentation:
    http://help.sap.com/saphelp_sm32/helpdata/en/0d/d309664a0c11d182b80000e829fbfe/content.htm
    offline: Database backup in offline mode, in other words, the database is shut down during backup. When you select this parameter, BRBACKUP checks that no SAP system users are connected to the database. If an SAP System is active, the database is not shut down and BRBACKUP terminates the process with an error message (message number BR0068E).
    Regards
    Stefan

  • How do I configure an IP Printer that requires a user code?

    Hi, I am using my Macs in a shared office environment where we have a Ricoh printer accessible via an IP address. The instructions for configuring the printer are written for Windows Vista and Windows XP users (sigh). I am able to add the printer by typing in its IP address, and I get a list of some printer options. But apparently this printer requires clients to log in with a user code before starting a print job and therefore my print commands from my Mac don't get processed. How do I do this from Leopard?
    Thanks in advance for your help.

    DXB Law wrote:
    Yes, I am aware that it is my own IT management that requires the user code, not the printer,
    I only mentioned it because there are many people that think it is all "the printer's fault" that they need a user code.
    and my IT management has given me step-by-step instructions for how to configure Windows Vista to transmit that user code to the printer. But it seems that you are saying there is no configuration option in Leopard that allows for the transmission of a user code to a network printer?
    I don't know enough about Windows to comment on the different way things are handled. In the case of the Ricoh printers, the user code is submitted with the print job. PCL printers include PJL data along with the job. For PostScript printers, Ricoh does supply drivers with printer extensions that allow for the user to input their user code via the normal user interface.
    For non-PostScript network printers, Ricoh uses either a PCL 5 variant or PCL 6/PCL XL. There are several generic drivers for these printer languages, so users on most, if not all, other operating systems can print to the Ricoh printers. Further, Ricoh actually provides the PPDs for their printers that include all the extra functions (user codes, stapling, etc) that are available for a particular model. These PPDs get included in the OpenPrinting foomatic database. That way users of any system that can utilize the foomatic scheme will be able to print to Ricoh printers. This is not limited to Mac OS X. Foomatic supports CUPS, LPRng, LPD, GNUlpr, Solaris LP, PPR, PDQ, and CPS. It would be nearly impossible to write a specific graphical user interface for all the variants of Unix and Linux. That is why you must resort to editing a PPD file by hand.
    You may be able to eventually help other Mac OS X users by letting Ricoh tech support politely know that it would be *most helpful* to have an easy to use user interface to input your user code. With there being more and more Mac OS X users, I hope they will do something to keep their customers happy.
    Just remember, there are some manufacturers that still use proprietary printer languages for network printers. If they don't support your system, tough luck.
    Matt

  • How do i create one source file that feeds two users on the same pro book?

    how do i create one source file/folder of photos that feeds two users on the same pro book?

    Well you can do exactly the same with a folder of photos, just put in the Users/Shared folder.
    Iphoto is a mite more complex than this. It's a database and so there's a bit more involved.
    For iPhoto 09 (version 8.0.2) and later:
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • How to display system property in XML forms

    Hi
    We are using XML forms template for publishing news in KM. In the show form we got author field (a label in the form) which is mapped to system property createdby (PropertyReference = /Properties/default:createdby).But while displaying the form author is not getting populated. When I try to edit the form in XML forms builder in data model tab under properties node no property is visible. Nothing is shown up in properties even after reload option is selected from context menu of properties node.
    I cheked by manually editing PropertyReference to some other property (e.g. modifiedby) but nothing is showing up.
    Can you please suggest how the createdby system property can be shown in the xml form?
    Thanks & Regards
    Sudip

    Hi Sudeep,
    Please try to open the formbuilder in another machine and try to see the properties xml form design view.
    You can even directly can create a lable in show form and add the property name along with the nama space name.
    For default properties namspace is default.Create a lable UI element in show form and select the datasource property and add the property value in that.
    With we can show file related system generated properties in show form.
    Regards,
    Rudradev Devulapelli

  • Can you set a global EntityResolver (via system property, or static method)

    I'm trying to set a customized EntityResolver (telling the xml parser where to look for XML schema files).
    Usually, you'd use the standard syntax - somehting like:
    SaxParser parser=new SaxParser();
    parser.parser.setEntityResolver(myResolver);
    However, I was wondering whether you can set a "global" EntityResolver, to be used as default for all parsers ?
    Maybe this can be done through some system property, or a static method somewhere in the parsing XML ?
    (BTW, I need it because I'm using some third-party API, that encapsulates a SaxParser, but won't let me access it, so I can't configure it directly).
    thanks.

    I don't think you can.
    What is possible is to set content on the folder resource itself; that would be returned instead of the page you mentioned.

  • I no longer have access to system folders that allow me to remove old or incorrect PAGES templates. Need to find out how to do that. The only way I can do it now is to blank the template and replace the bad template with a blank.

    I no longer have access to system folders that allow me to remove old or incorrect PAGES templates. Need to find out how to do that. The only way I can do it now is to blank the template and replace the unwanted template with a blank. It was previously possible to go to MY TEMPLATES and remove the unwanted templates. I don't if this issue is before or since installation of 10.8 (a nightmare in my case, which led to significant failure issues).  And because I haven't tried to remove templates since finally managing to install 10.8 (now at 10.8.4), I don't know if this is typical of the newer OS or a problem. I've been a Mac user for more than 25 years, but I think I'm nearing the end of the road. By the way, I've never needed to do this before because the manuals always offered an answer... they don't seem to do that anymore. In any case, I don't know how this works... I'd prefer an email reply if that's possible. But that would probably be too easy, and I don't know how to get a reply.

    Thanks, I appreciate the help.  I think this is one of the problems Apple is creating by changing the OS so often. I had fomer colleagues at [a major aerospace contractor] who told me that so many original files were ultimately lost because of the deadly change in the "Save As" operation that they are now afraid of every OS update. Apple has badly damaged their support base with that very prominent company (they won't update now until they've fully examined and understand changes in the pre-conditioned nature of OS computer functions), and they are a whole lot less enthaled with Mac-related equipment/software. Can't blame them, I too used orginal files that way (as easy-to-use templates), and lost some important files before I realized what was happening (to late to revert). Companies should not have to retrain employees each time an OS gets an update, it's can be very expensive several different ways. They learned a painful lesson with that one. And because I'm now retired and don't use multiple devices, I need iCloud like I need a hole in the head... but I'm told there's no way to keep Apple out of my computer. Fortunately, because of major problems when initially installing Mountain Lion, one hold-over of the hardware/software damage I experienced was that iCloud can no longer access my computer even though everything else is working fine again. That was the only "good luck" I had as a result of that expensive nightmare.

Maybe you are looking for