redhatping 发表于 2011-3-4 20:46:15

win7无法执行开机运行代码

#include <IE.au3>
#include <Date.au3>

$chack=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","daka")
If $chack="" Then
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","daka","REG_SZ",@ScriptDir&"daka.exe")
EndIf

If @HOUR>18        Then
xiaban()
Else
shangban()
EndIf

Func xiaban()
$oIE = _IECreate ("http://192.168.1.132:101/")
$oForm = _IEFormGetCollection ($oIE, 0)
$oQuery = _IEFormElementGetCollection ($oForm, 0)
_IEFormElementSetValue ($oQuery, "lixiang")
$oQuery = _IEFormElementGetCollection ($oForm, 1)
_IEFormElementSetValue ($oQuery, "111111li")
Send("{ENTER}")
$oIE = _IECreate ("http://192.168.1.132:101/general/attendance/personal/duty/submit.php?REGISTER_TYPE=2")

EndFunc

Func shangban()
$oIE = _IECreate ("http://192.168.1.132:101/")
$oForm = _IEFormGetCollection ($oIE, 0)
$oQuery = _IEFormElementGetCollection ($oForm, 0)
_IEFormElementSetValue ($oQuery, "lixiang")
$oQuery = _IEFormElementGetCollection ($oForm, 1)
_IEFormElementSetValue ($oQuery, "111111li")
Send("{ENTER}")
$oIE = _IECreate ("http://192.168.1.132:101/general/attendance/personal/duty/submit.php?REGISTER_TYPE=1")
EndFunc

redhatping 发表于 2011-3-4 20:46:35

注册表中始终插入不进去

redhatping 发表于 2011-3-4 20:46:37

注册表中始终插入不进去

boyhong 发表于 2011-3-5 16:59:28

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","daka","REG_SZ",@ScriptDir&"\daka.exe")
或者:
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","daka","REG_SZ",@AutoItExe)
页: [1]
查看完整版本: win7无法执行开机运行代码