找回密码
 加入
搜索
查看: 1539|回复: 4

请帮我修改下错误,谢谢!

[复制链接]
发表于 2009-9-1 12:23:34 | 显示全部楼层 |阅读模式
我这有一段代码,提示 $path = \\Server\baojing\  这行解析错误,请帮我看看怎么修改!
#include <GUIConstants.au3>
#NoTrayIcon

$path = \\Server\baojing\

While 1

$time0 = @mon & "月" & @mday & "日"
$time1 = "开始时间" & @mon & "-" & @mday & " " & @hour & ":" & @min & ":" & @sec
$time2 = @mon
$time3 = @mday
if FileExists ($path & $time0 & ".htm") then
    Else
filewriteline($path & $time0 & ".htm","<HTML>")
filewriteline($path & $time0 & ".htm","<HEAD>")
filewriteline($path & $time0 & ".htm","<meta http-equiv='refresh' content='11'>")
filewriteline($path & $time0 & ".htm","<TITLE>")
filewriteline($path & $time0 & ".htm", $time2 & "月"& $time3 & "日" & "非法上机记录")
filewriteline($path & $time0 & ".htm","</TITLE>")
filewriteline($path & $time0 & ".htm","</HEAD>")
filewriteline($path & $time0 & ".htm","<BODY>")
  EndIf

$name =regread("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName")
$name1 = @Computername
if ProcessExists ("pubwin.exe")Then
    Else
$time0 = @mon & "月" & @mday & "日"
$time1 = "开始时间" & @mon & "-" & @mday & " " & @hour & ":" & @min & ":" & @sec
filewriteline($path & $time0 & ".htm","客户机 " & $name & " 发现PUBWIN进程被非法结束,请注意!" & $time1 & "   ====  " & $name1 & "</P>" )
  EndIf

Sleep(10000)

$name =regread("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName")
$name1 = @Computername
if FileExists ("C:\Program Files\PUBWIN\PUBWIN.EXE") then
    Else
$time0 = @mon & "月" & @mday & "日"
$time1 = "开始时间" & @mon & "-" & @mday & " " & @hour & ":" & @min & ":" & @sec
filewriteline($path & $time0 & ".htm","客户机 " & $name & " 发现C:\Program Files\PUBWIN\PUBWIN.EXE" & $time1 & "   ====  " & $name1 & "</P>" )
  EndIf

Sleep(10000)

WEnd
发表于 2009-9-1 13:51:02 | 显示全部楼层
没学会爬就想会走的感觉。
发表于 2009-9-1 14:23:42 | 显示全部楼层
$path = \\Server\baojing\
其他和服务器格式的问题先不管,引号呢
发表于 2009-9-1 15:30:26 | 显示全部楼层
在哪copy来的吧,额
发表于 2009-9-2 10:36:48 | 显示全部楼层
路径分为相对路径和绝对路径,并且在AU3中,路径是字符串,需要有引号的
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-16 00:45 , Processed in 0.086575 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表