找回密码
 加入
搜索
查看: 1683|回复: 4

[系统综合] 请问如何显示隐藏文件

  [复制链接]
发表于 2012-8-2 17:41:14 | 显示全部楼层 |阅读模式
au3中有无这样一个函数能实现这个功能?
发表于 2012-8-2 18:16:36 | 显示全部楼层
帮助文档不知道你找了没,反正我是没找到,不过论坛倒是有答案
http://www.autoitx.com/forum.php ... A%BE%2B%D2%FE%B2%D8
发表于 2012-8-2 18:57:56 | 显示全部楼层
$Form1 = GUICreate("显示或隐藏文件和文件夹", 266, 81, -1, -1)
$Button1 = GUICtrlCreateButton("显示文件", 36, 24, 89, 33)
$Button2 = GUICtrlCreateButton("隐藏文件", 140, 24, 89, 33)
GUISetState(@SW_SHOW)
Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Button1, "Install")
GUICtrlSetOnEvent($Button2, "Uninstall")

While 1
        Sleep(100)
WEnd
Func _Exit()
        Exit
EndFunc   ;==>_Exit
Func Install()
        RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden", "REG_DWORD", "1")
        RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSuperHidden", "REG_DWORD", "1")
        DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0)
        MsgBox(0, "", "显示文件成功", 3)
EndFunc   ;==>Install
Func Uninstall()
        RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden", "REG_DWORD", "2")
        RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSuperHidden", "REG_DWORD", "0")
        DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0)
        MsgBox(0, "", "隐藏文件成功", 3)
EndFunc   ;==>Uninstall
发表于 2012-8-3 12:41:45 | 显示全部楼层
完全是注册表操作,可以看看注册表UDF
发表于 2012-8-3 15:27:19 | 显示全部楼层
好东西先收场了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-27 15:53 , Processed in 0.082534 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表