设置文件或文件夹属性
优质
小牛编辑
144浏览
2023-12-01
Section " SetFileAttributes" SetFileAttributes "C:\demo" HIDDEN ;设置文件夹属性为隐藏 SetFileAttributes "C:\demo\demo.txt" HIDDEN|READONLY ;设置文件属性为隐藏,只读 SetFileAttributes "C:\demo\demo.txt" NORMAL ;恢复 文件(夹)使用NORMAL 属性即可 SectionEnd ;需要find了文件才能设置属性!如此循环 nsExec::ExecToStack '"ATTRIB" +R +S "$INSTDIR\*.INI"' nsExec::ExecToStack '"ATTRIB" +R +S "$INSTDIR\Home\home.XDATA"' ;R只读, S系统,H隐藏