我的IP cam有时会将自身恢复为默认值。我有一个脚本可以每两个小时左右运行一次VBS。我希望vbs将Params文件发送到cam,即使我不在那里。
这是我一整天都在做的事情。到目前为止,最好的事情是“网络错误”
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate("about:blank")
IE.AddressBar = False
IE.ToolBar = True
IE.StatusBar = True
IE.Resizable = False
IE.Visible = True
DataToPOST1 = "C:\Users\Garo\Desktop\params.bin"
Header = "Content-Type: application/x-www-form-urlencoded"
WScript.Sleep 5000
post = "/restore_params.cgi?"&"user=admin&pwd="""
IE.Navigate "192.168.1.17" & post, Nothing, Nothing, StringToBinary(DataToPOST1), Header
Function StringToBinary(str)
Dim tmpArr()
Dim i
ReDim tmpArr(Len(str))
For i = 1 Ro Len(str)
tmpArr(i-1) = CByte(AscB(Mid(str,i,1)))
Next
StringToBinary = tmpArr
End Function