黑色de郁金香 发表于 2012-8-2 17:41:14

请问如何显示隐藏文件

au3中有无这样一个函数能实现这个功能?

502762378 发表于 2012-8-2 18:16:36

帮助文档不知道你找了没,反正我是没找到,不过论坛倒是有答案
http://www.autoitx.com/forum.php?mod=viewthread&tid=25216&highlight=%CF%D4%CA%BE%2B%D2%FE%B2%D8

lpxx 发表于 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

menfan1 发表于 2012-8-3 12:41:45

完全是注册表操作,可以看看注册表UDF

tuojian110 发表于 2012-8-3 15:27:19

好东西先收场了
页: [1]
查看完整版本: 请问如何显示隐藏文件