Fw:can ' t Create File in the C drive Root directory–windows 8

Source: Internet
Author: User

http://www.mkyong.com/computer-tips/cant-create-file-in-the-c-drive-root-directory-windows-8/

Developing a simple Java program to write a file with the C drive root directory (where Windows is installed), but the Progr Am prompts an "access is denied" error. Try to create a empty file in the C drive root directory manually, but no options to create any files, only new folder is Allowed.

P.S the logged in user is under Administrator group.

Solution

In Windows 7 or 8 (could be Vista), users (even administrators) is not allowed to create files in the C drive root director Y, otherwise, an error message like 'A required Privilegeis not held by the client ' or 'access is DENIED "would be prompted."

To fix it, just turn off the User account Control (UAC). In Windows 8, does not turn off the UAC via Control Panel, it must go through the registry.

    1. Press keys "Windows Key + R", typeregedit
    2. LocateHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA
    3. Update the EnableLUA value to 0 (turn if off)
    4. Restart Windows.

Alternatively
If you think it's not safe to turn off the UAC feature, then create a new folder under the C drive root directory and put The file inside.

C:\folder\your-file.txt-OK
C:\your-file.txt-NOT OK

Fw:can ' t Create File in the C drive Root directory–windows 8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.