FW: Can’t Create File In The C Drive Root Directory – Windows 8
2015-01-05 12:02
477 查看
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 in the C drive root directory (where Windows is installed), but the program prompts an “access is denied” error. Try to create an 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.
To fix it, just turn off the User Account Control (UAC). In Windows 8, do not turn off the UAC via control panel, it must go through the registry.
Press keys “Windows Key + R”, type
Locate
Update the
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.
Developing a simple Java program to write a file in the C drive root directory (where Windows is installed), but the program prompts an “access is denied” error. Try to create an 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 (may be Vista), users (even administrators) are not allowed to create files in the C drive root directory, otherwise, an error message like “A required privilege is not held by the client” or “access is denied” will be prompted.To fix it, just turn off the User Account Control (UAC). In Windows 8, do not turn off the UAC via control panel, it must go through the registry.
Press keys “Windows Key + R”, type
regedit
Locate
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA
Update the
EnableLUAvalue to 0 (turn if off)
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
相关文章推荐
- SYBASE备份报错:Can't open a connection to site 'SYB_BACKUP',see the error log file in the ASE directory
- How can I force Python's file.write() to use the same newline format in Windows as in Linux (“\r\n”
- MySQL Can't create/write to file 'c:/windows/temp/#sql_2d0_0.MYD' 问题的解决
- Can I open Explorer in the C:\ drive instead of the My Computer view?
- How to Change the Icon for a File Type in Windows 7 and Vista(转)
- Can not find a java.io.InputStream with the name [downloadFile] in the invocation stack问题解决
- java.lang.UnsatisfiedLinkError,(A file or directory in the path name does not exist.
- vs2005下出现“Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive”的解决方法
- Can not find a java.io.InputStream with the name [downloadFile] in the invocation stack问题解决
- 解决cakePHP中的. session_start()[function.session-start];open_basedir restnction in effect.File(c:/windows/temp/)is not within the a
- Using Create directory & UTL_FILE in Oracle
- find the bigest file in a directory tcl tk
- CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\application1\c11b43f6\cf3ec03\rizcntet.dll' . The directory name is invalid.
- [Transferred] Create a new Drive or Partition in Windows Vista
- Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(F:/Windows/TEMP/) is not within the
- How can I hide a user from the Welcome Screen in Windows XP?
- Security and Versioning Models in the Windows Forms Engine Help You Create and Deploy Smart Clients
- How To Create a Child Domain in Active Directory and Delegate the DNS Namespace to the Child Domain
- JDeveloper JSP files must reside in the server root directory or a subdirectory
- Windows SDK Registry: How can I read in data from the registry?