首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Windows如何去掉"系统、隐藏、只读"属性

Windows如何去掉"系统、隐藏、只读"属性

原创
作者头像
Windows技术交流
修改2024-03-08 14:22:07
修改2024-03-08 14:22:07
1.3K0
举报
文章被收录于专栏:Windows技术交流Windows技术交流

以隐藏的D:\Ghost和D:\Ghost\Backup.GHO为例

cmd命令:

代码语言:bash
复制
attrib +s +h +r /s /d D:\Ghost
attrib -s -h -r /s /d D:\Ghost
cd /d "D:\Ghost"
attrib +s +h +r /s /d *.*
attrib -s -h -r /s /d *.*

上面几句cmd命令对应的powershell命令如下

Get-Item -Path "D:\Ghost" -Force | ForEach-Object { attrib +H +S +R $_.FullName }
Get-Item -Path "D:\Ghost" -Force | ForEach-Object { attrib -H -S -R $_.FullName }
Set-Location -Path "D:\Ghost"
Get-ChildItem -Path "D:\Ghost" -Recurse -Force | ForEach-Object { attrib +H +S +R $_.FullName }
Get-ChildItem -Path "D:\Ghost" -Recurse -Force | ForEach-Object { attrib -H -S -R $_.FullName }

powershell命令:Set-ItemProperty只能设置以下属性: Archive、Hidden、Normal、ReadOnly 或 System。

代码语言:powershell
复制
Set-ItemProperty -Path "D:\Ghost" -Name Attributes -Value Normal
Set-ItemProperty -Path "D:\Ghost\Backup.GHO" -Name Attributes -Value Normal

powershell命令:Clear-ItemProperty

代码语言:powershell
复制
Set-ItemProperty -Path "D:\Ghost" -Name Attributes Hidden
Clear-ItemProperty -Path "D:\Ghost" -Name Attributes
Clear-ItemProperty -Path "D:\Ghost\Backup.GHO" -Name Attributes

如果没有Administrator权限,如此恢复

cmd:

代码语言:bash
复制
TAKEOWN /F D:\Ghost /A /R /D Y
ICACLS D:\Ghost /T /grant :r Administrators:F

powershell:

代码语言:powershell
复制
cmd.exe /c "TAKEOWN /F D:\Ghost /A /R /D Y"
cmd.exe /c "ICACLS D:\Ghost /T /grant :r Administrators:F" 

可以通过系统本身修改属性(如果设置了五种属性中的System属性,则无法通过图形界面去除,只能通过命令行),也可以通过第三方文件属性修改器(搜了下有很多),比如UltraFileExternal.exe

类似的,也有专门修改文件3个时间戳的第三方工具,比如NewFileTime。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档