Trouble getting the default  user directory under Windows XP

I m trying to get the default user directory under windows XP SP3.
To do so, I'm using
System.getProperty("user.home");
I was expecting to get a path like "C:\Documents and Settings\user", nstead of that I get "C:\Documents and Settings\user\Destop".
I checked the %USERPROFILE% and %HOMEPATH% window's environment variables and both of them are correctly set ( set to "C:\Documents and Settings\user").
Is there any way to get the right path other than using : System.setProperty("user.home", "C:\\Documents and Settings\\user"); ?

Thanks WalterLaan,
The System.getenv("USERPROFILE") method will, at least, fix the problem under win XP.
I guess i'll have to write a more refined method to be able to deploy my application under differents OSes.
Regards.

Similar Messages

  • How do you change the default User in Windows 7 on a non-RAIDed 4 disk setup?

    Hi.
    I have installed Windows 7 Ultimate 64bit on Darling my new machine, which has a four-disk setup without RAID, like this:
    SSD OCZ -OS, Programs (C:)
    WD 2002FEAX - Media Projects (D:)
    WD 1002FAEX - Pagefile, Media Cache (E:)
    WD 1002FAEX - Previews, Exports (F:)
    This setup, and because it’s unRAIDed (four separate disks), created the User file in the OS disk, right under the Programs (x86) folder, which at times causes files, which are not programs, to automatically be saved in the User file that's in the Programs disk, when in fact Programs disk is NOT meant for storage.
    Further, I cannot save stuff in My Documents because that directory leads the files (that I am saving) to the User folder in the OS disk, forcing me to navigate out of there and into an alternative disk, which is time consuming, more so than if i had a directory leading to D disk.
    So, I am wondering, can anyone help me change my directory to establish the default User folder in any folder other than C?
    Or, if can someone refer me to Windows 7 tutorials, resourses, that are a tad more than Dummy level.
    I have heard that changing around the directory as such can mess with the OS, and though not at Dummy level, I’m quite new to PC and profusely insecure about making changes to Darling at all.
    Thanks.

    Hi folks.
    I would like to update you about what happened regarding my wish to move the User location to another hard disk. Heeding your warning, i did NOT attempt that, but rather, moved the location of the My Documents folder in my Library, from its default place on (SSD) disk C:/ (which is the default location because that's where i installed Windows 7,) to another disk -  D:/ called "Media Projects".
    Here is how my directory looked before i made the change, my three hard disks were outside the Library directory that's on my SSD (Programs disk):
    (I did that by right-clicking the My Documents folder in the left column of a browser window, to access the Location tab.)
    What this did is, it put driver D:/ under Documents, which is under Library, see picture, which now enables saving documents quickly, by going from my Library directly to my D drive, however it eliminated the "My Documents" folder/possibility all together from the left-column list of folders in the Windows Explorer browser pane.
    I am now trying to do the same with Music, Pictures, and Videos, i.e. to move them to D drive, but am unable to do so because right-clicking those icons in the directory does not produce the Location tab in Properties panel, and nor does right-clicking inside the files themselves.
    Similarly, right-clicking Downloads, which i also want to have residing in my D drive, does NOT produce a Location tab in properties pane, though it does seem possible to change the directory manually...see picture.....but am wary....
    I am still monitoring my new system, and will see if and how this change effects my system's performance.
    Thanks.

  • Powershell Script to change the default user Account picture for all users in windows 7 and 8

    Hello,
    Can some sone help me with PS script to change user account pictures of all user account in windows 7 and windows 8 ?
    I will deploy this through MDT TS as Custom TS after OSD.
    Shailendra
    Shailendra Dev

    Hello,
    Can some sone help me with PS script to change user account pictures of all user account in windows 7 and windows 8 ?
    I will deploy this through MDT TS as Custom TS after OSD.
    Shailendra
    Shailendra Dev
    The default user account picture is stored here.
    C:\programdata\Microsoft\User Account Pictures\user.bmp
    It should just be a matter have copying the picture you want to that location and over writing what is there.
    or....
    Computer Configuration\Administrative Templates\Control Panel\User Accounts\Apply the default user logon picture to all users
    You can also configure this by a registry setting;
     [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
      UseDefaultTile = 1
    The picture that you configure, will not be loaded until the user account will actually be created on the pc. Meaning the first time a >new< user will log on to a pc, they will have no picture shown at all using their login screen (this is default
    behavior). Same will occur if you enable the policy don't display last user name. However, once they log in the picture will be shown in the start menu, and if they lock their pc the image will also be shown

  • How to get the SSO user from PL/SQL with Windows native authen

    I connect to a 10g daabase using SSO through Windows Native Authentication wher the OID user mapps to a single Database user.
    I need to get the SSO user from pl/sql
    My fornt end is Portal & Forms

    Hmm, I see.
    Well your problem boils down to being in the database and needing to have access to web environment variables. The SSO sets specific variables in the environment but your stored procedure is not privy to them.
    Now having said that, note that the mod_plsql Web Toolkit has a utility for accessing cgi variables. For instance,
    owa_util.get_cgi_env('Osso-User-Dn')
    If your web application cannot capture the SSO info and pass it to the stored proc in a parameter, OWA may be the only way.
    Check out the Single Sign-On Developers Guide, specifically the part about developing statically protected PLSQL applications.
    Hope this helps.
    regards,
    tt

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • Using copyprofile to customize the default user profile

    Well to get to the problem I'll just explain what I do, which doesn't work.
    1. I install windows 8.1 pro (x64) on a test-pc.
    2. After installation I press cntrl shift f3 to get into audit mode.
    3. I install all software/drivers etc. I also place shortcuts and change the background.
    4. I insert my usb, which contains a file called "unattend.xml" in which this is written:
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <CopyProfile>true</CopyProfile>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:e:/usb/windows%207%20en%208/win81pro/sources/install.wim#Windows 8.1 Pro (x64)" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    5. After that I use CMD and use this command: C:\windows\system32\sysprep\sysprep /oobe /generalize /shutdown /unattend:F:\unattend.xml
    6. when it is done working and turns off, I turn it back on and walk through the oobe. After that my shortcuts and background are standard windows 8.1 and not the ones I used.
    Can anyone see what I did wrong? I can't seem to figure it out. Thanks!
    Btw: This unattend.xml file is created with windows system image manager of the same install.wim which is used to install that OS.
    Note: If I generalize a pc after an installation, doesn't that cancel the activation? So when I bring it to a customer he needs to fill in the activation key? 

    Hi,
    After the step 5 (I mean after we customize the default user profile and reference PC sutts down), generally as I know, we should then capture image, you can boot into Windows PE and then capture the Windows installation by using DISM.
    See full guide in the link below
    https://technet.microsoft.com/en-in/library/hh825135.aspx?f=255&MSPPError=-2147217396
    The article also contains some conditions in which user profile settings aren't successfully copied, such as you can not use a domain account, there are no additional user accounts other than the built-in administrator account that you configured,, etc and
    sysprep will remove all the security settings of your Windows including windows activation.
    Regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Create default user settings like WIndows XP

    When I configure a Windows machine I can make the desktop and all application settings I want. I then copy the profile to the DEFAULT USER account. Now when any user is created on that machine it takes on all the same settings as the default account.
    This allows me to set proxy settings in all browsers, setup printers, backgrounds, and other other preferences. the new account gets these settings on creation.
    How do I do this on the macintosh? When it creates a new user they all look the same so there must be some plist files or settings somewhere I can change when I build the image.
    We have 850+ machines running 10.4 through 10.6. We use a firewall in transparent mode because the mac's cant handle the proxy settings with all the roaming profiles and home/synced accounts.
    If I can get all new accounts created to take on the necessary settings by default we can switch our firewall to non transparent and that opens up a lot of features we must have. Plus it would be nice to have the same look and feel on every single account.
    Lannie

    /System/Library/User Template is where all of these are stored. You will have enable the root login account and log in to it in order to make changes to that folder with the GUI.
    Changing anything in the System folder is always a bit unreliable, though. Apple might release a software update that will undo any of the changes.
    If you really are managing 850+ Macs, you should look into getting OS X Server. OS X Server has the tools you need to set up custom templates for new users, without having to muck in the System folder.

  • Where does FireFox get the default value of a preference from. What is the format of the file that has the default value?

    Where does FireFox get the default value of a preference from. What is the format of the file that has the default value?. I need the actual default value for a particualr preference.
    About:config does show some default values but I need the source from which about:config picks up the default value.
    Any help in this direction is greatly appreciated.
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    The prefs that aren't hidden if they are the default are stored in two JavaScript text files in the Firefox program folder
    You can open them via these links in a Firefox tab:
    <code>resource:///defaults/pref/firefox.js
    resource:///greprefs/all.js
    </code>
    ([/forum/1/702598])

  • Getting the default Microphone

    Hello,
    I'm working on an audio/video conferencing app with FMS and
    Flex 2.0.1 (using Debug Flash Player 9.0.47 Mozilla/Windows Vista).
    When the client app starts, it should connect the default Camera
    and Microphone. Now, for the Camera this works fine, but I can't
    get my application to grab the default Microphone.
    According to the documentation (livedocs), if you don't pass
    an id for the Microphone, it should get you the default one. As far
    as I can tell, the default one should be the one that is selected
    when the Flash Settings dialog shows and this setting is persistent
    between different Flash sessions. Also, the reference to the
    default microphone should automatically change when the user
    changes the settings.
    However, I invariably get the Microphone with index=0. The
    code:
    var mic = Microphone.getMicrophone();
    What puzzles me is that Adobe claims that there is a way to
    get the default camera, but this seems impossible as the array of
    microphone indices is 0-based, and the argument to getMicrophone is
    an int. How does it distinguish between a call for microphone 0 and
    the default microphone?
    This has been solved better for the camera. The method
    Camera.getCamera() takes a String as an argument and this argument
    should contain the index of the camera (and not the name, as the
    documentation claims). The string can be null, in which case the
    default camera is returned.
    Does anyone know of a workaround to get the default
    Microphone? Has this been reported as a bug to Adobe?

    hi ThatGuyBS,
    Welcome to the Lenovo Forums.
    As the IdeaPad G505s uses a 2-in-1 audio jack (headphone and mic), you will need a headset splitter / adapter for a headset to work.
    If you're be using an external monophonic microphone only, you will need an extra 3.5mm Stereo male to 3.5mm Mono female adapter connected to the headset.
    Article:
    Microphone/Headset Jack - splitter needed for combo
    Sample items:
    - 3.5mm Stereo male to 3.5mm Mono female adapter
    - 3.5mm Headphone / Microphone adapter
    Alternatively, you can also use a USB microphone to elimiate getting an headset adapter.
    Regards
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Advice for Creating a Custom Default User Profile in Windows Enterprise 8/8.1 Preview

    Just after some advice on the Best way to create a custom Default User Profile for our Windows 8 Enterprise Image.
    We are also looking at the Windows 8.1 Enterprise preview so advice on creating a Default User profile for this would also be appreciated.
    My Requirements are listed below
    -Pinned Web sites that open in Windows 8 App style IE
    -Default Windows 8 pre-installed Apps
    -The Microsoft Lync Windows 8 Client from the App Store *I understand this would be tricky, not fussed though if it cant be done*
    -Customised Start screen layout
    I have tried the Copy Profile tag in the Unattend.xml and syspreped the machine, this did not work.
    I have tried using the new "Start Screen Layout" Group Policy object, this also did not work
    The Closest I can get was to setup a user profile, Backup the Default User profile, Rename the User I worked on to "Default", Clean up the temp folder, then navigate through the user registry and replaced any absolute profile paths with the %USERPROFILE%
    variable. This worked in terms of setting the layout of the start screen, but the Lync App was not present, and Windows 8 apps, eg Video, Music and IE, would crash when attempting to open them.
    I know I am doing something wrong, so any advice would be much appreciated.
    Thankyou

    Still not getting the results that I want, to recap I am trying to do the following.
    Create a Windows 8.1 Enterprise Standard Operating Environment (SOE) Image for laptop devices at our school. These devices will be in the Students hands 24/7 and will be joined to our Windows 2012 based domain.
    I am trying to create a custom Default user profile for the image so that when a student logs onto the Laptop for the first time they get a start screen that we have created.
    The start screen consists of Pre-installed Modern Apps, a modern app created by our Software team that is side-loaded, Office 2013 Applications, and most importantly Tiles for Websites such as our Learning Management System and Intranet Portal.
    Now to the issues
    I boot the target system into Audit mode, and setup the start screen accordingly. For the Websites,
    I open the websites in the IE11 Modern app and use the built in control to pin the site to the start screen. Everything goes and looks as expected.
    I then run sysprep with a custom unattend.xml with copyprofile inside it. Again everything runs as expected.
    Now when I create a new user on the system the custom start screen appears however the websites that were pinned are no longer on the start screen. BUT when I manually open the Modern IE11 app, navigate to the website and pin the site, The Tile now appears
    on the start screen in the location I put it.
    <Rant>
    Now this puts us in a situation where we can no longer deliver a Standard Operating environment for not just our managed laptops but also our labs where a student just wants to logon and get to work.
    Why as a Desktop and System Administrator, who manages a fleet of 300+ Desktops and 1000+ Laptops do I not have the full power to customise things they way I want them.
    Yes I am aware of the new Group Policy setting for deploying Start screen configurations, Doesn't work when Web sites are pinned
    Yes I am aware of AppsFolderLayout.bin, Doesn't work for Pinned sites.
    Do the links above to Microsoft TechNet articles explaining how to customise Start Screens help, No they do not.
    Finally I am aware that I can just create a shortcut to the websites and pin those, the issue is that this does not utilise the new Live Tile code that was introduced with IE11 and we plan to use these Tiles as another notification system for our staff and
    students.
    I will continue to work on this, if I manage to find a solution myself I will post the process, however if anyone in the community, or from Microsoft for that matter, has a proven solution to pinning websites to the default user profiles start screen, please
    post it.
    </Rant>
    Thankyou

  • Getting the default charset.

    Hi,
    I need to get the default charset of the platform that I am using. I found a workaround by using an InputStreamReader with the required parameters and calling getEncoding() method. After this, I can user Charset.forName(...). On Windows platform, I get "Windows-1252". That's ok.
    This solution works but, maybe someone knows a simpler way to get the same information. This is what I would like to know.
    Thanks !

    Just been looking for exactly the same thing, so Google led me here. It also lead me to this:
    http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html
    In Java 1.5 ( but not in earlier versions), the Charset class contains a defaultCharset() static method, defined when the JVM starts up.
    Hope this helps.

  • Apply the default user logon picture to all users

    Hi
    I applied gpo "apply the default user logon picture to all users"
     Computer Configuration\Administrative Templates\Control Panel\User Accounts\Apply the default user logon picture to all users
    C:\programdata\Microsoft\User Account Pictures\user.bmp  --> renamed my company log to user.bmp.
    Taken backup of old user.bmp.
    But policy is not working.
    Environment:
    Windows Server 2008 R2
    Clients:Windows 7 and Windows 8

    Hi S.Vijay Kumar,
    Based on my understanding, the GPO which configured the
    Apply the default user logon picture to all users would not apply successfully. What’s more, you have customized the default user logon picture
    %ProgramData%\Microsoft\User Account Pictures\user.bmp. Right?
     Firstly, please check if the scope of this GPO and the setting of Filtering are correct.
    Secondly, please follow the steps below to check if the GPO is applied to these Windows XP clients:
    Click Start, type rsop.msc in the search box to access
    Resultant set of policy.
    Check if the GPO is applied to these clients and the setting of the GPO is correct.
    In addition, it would be helpful for future troubleshooting if you could help to collect the following information:
    Did the GPO fail to apply for all the computers or only some computers?
    Can you set the user.bmp as the user logon picture
    manually?
    Regards,
    Lany Zhang

  • How to get the Current User on the UI page?

    All,
    Could you please let me know how to get the Current user on the UI input page , i need to display the current user ID when some one clicks the submit button, i want o get the current user to display in the javascript alert box.
    Edited by: 951930 on Oct 24, 2012 12:21 PM

    lucky,
    my schema has already defined for
    <user mapField="USER_ID" default="%CurrentUser"/>
    and in my UI page
    <td oraLabel="user"></td><td oraField="user" id="userId" ></td>
    and my javascript
    function showUserId () {                        
    var curUser = document.getElementById('userId').value;
    alert(curUser);
    and i have called this function on my submit button, but i am not able to get Current Logged User ID value to show in the alert nor able to show the current logged user on the UI page.
    my requirement is on custom UI page i need to show Current Logged User in one corner of the page and also need to show the same user in alert when he submits the button.
    Appreciate for the help.
    Edited by: 951930 on Oct 25, 2012 8:42 AM
    Edited by: 951930 on Oct 25, 2012 9:06 AM

  • For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    Hi Spam_Valley,
    I understand that you are having issues with your music displaying correctly. This may be an issues with the metadata stored within that song, and iTunes interpretation of that info.
    We may need to repair this. See the following resources for information:
    iTunes 10 for Windows: If song titles don’t appear correctly
    http://support.apple.com/kb/PH1468
    Fixing Incorrect Song or Album Listings in iTunes
    http://support.apple.com/kb/TA24677
    Thanks,
    Matt M.

  • How to get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

Maybe you are looking for