本帖最后由 lpxx 于 2012-4-22 18:56 编辑
翻资料找到的,估计是你要的效果
另:论坛原因,代码复制后删除和即可。
#include <WinAPI.au3>
_index()
Func _index()
RegWrite("HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command", "", "REG_SZ", "C:\Program Files\Internet Explorer\iexplore.exe http://www.autoitx.com")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command", "", "REG_SZ", "C:\Program Files\Internet Explorer\iexplore.exe http://www.autoitx.com")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ", " http://www.autoitx.com/")
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL', 'CheckedValue', 'REG_DWORD', '0x00000000')
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", "1")
Dim $VK_F5 = 116
$hDesk = ControlGetHandle("[CLASS:Progman]", "", "SysListView321")
_WinAPI_PostMessage($hDesk, 256, $VK_F5, 0)
_WinAPI_PostMessage($hDesk, 257, $VK_F5, 0)
_ReduceMemory(@AutoItPID)
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}', '', 'REG_SZ', 'Internet Explorer')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\DefaultIcon')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\DefaultIcon', '', 'REG_SZ', 'C:\Program Files\Internet Explorer\IEXPLORE.EXE')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell\Open')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell\Open', '', 'REG_SZ', '打开主页(&H)')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell\Open\Command')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell\Open\Command', '', 'REG_SZ', 'C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.autoitx.com')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell\属性(&R)')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell\属性(&R)\Command')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\Shell\属性(&R)\Command', '', 'REG_SZ', 'Rundll32.exe Shell32.dll,Control_RunDLL Inetcpl.cpl')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\ShellFolder')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{98745625-1234-1234-1234-1234567890AB}\ShellFolder', 'Attributes', 'REG_DWORD', '0x00000000')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{98745625-1234-1234-1234-1234567890AB}')
RegWrite('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{98745625-1234-1234-1234-1234567890AB}', '', 'REG_SZ', 'Internet Explorer')
EndFunc ;==>_index
_ReduceMemory(@AutoItPID)
Func _ReduceMemory($i_PID = -1)
If $i_PID <> -1 Then
Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID)
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0])
DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0])
Else
Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)
EndIf
Return $ai_Return[0]
Run("RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters")
DllCall("user32.dll", "int", "SendMessageTimeout", "hwnd", 65535, "int", 26, "int", 0, "int", 0, "int", 0, "int", 1000, "str", "dwResult")
DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 1, "str", $bmpFile, "int", 1)
DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0)
DllCall("Userenv.dll", "int", "RefreshPolicyEx", "int", 1, "int", 1)
EndFunc ;==>_ReduceMemory
|