自动更新工作站的应用程序
2006-02-27 21:13:07 来源:WEB开发网核心提示:PRivateSubForm_Load()OnErrorGoToerrorhandler'Command函数返回'命令行的字符串信息'该程序需要两个参数'如:(thisprog.exec:\localdir\prgcopied.exe'k:\servrdir\prgtocopy.
PRivateSubForm_Load()
OnErrorGoToerrorhandler
'Command函数返回
'命令行的字符串信息
'该程序需要两个参数
'如:(thisprog.exec:\localdir\prgcopied.exe
'k:\servrdir\prgtocopy.exe)
IfFileDateTime(Left(Command$,InStr(Command$,"")-1))<FileDateTime(Mid$(Command$,InStr(Command$,"") 1))Then
Top=(Screen.Height-Height)/2
Left=(Screen.Width-Width)/2
label1="拷贝"&Mid$(Command$,InStr(Command$,"") 1)&"到你的硬盘..."
Visible=True
Refresh
FileCopyMid$(Command$,InStr(Command$,"") 1),Left(Command$,InStr(Command$,"")-1)
EndIf
'开始程序
x=Shell(Left(Command$,InStr(Command$,"")-1),3)
End
ExitSub
errorhandler:
IfErr=53Then'文件没有
ResumeNext'还是要拷贝
Else
MsgBox"错误#"&Err&Chr(10)&Error&Chr(10)&"结束"
End
EndIf
ExitSub
EndSub->
OnErrorGoToerrorhandler
'Command函数返回
'命令行的字符串信息
'该程序需要两个参数
'如:(thisprog.exec:\localdir\prgcopied.exe
'k:\servrdir\prgtocopy.exe)
IfFileDateTime(Left(Command$,InStr(Command$,"")-1))<FileDateTime(Mid$(Command$,InStr(Command$,"") 1))Then
Top=(Screen.Height-Height)/2
Left=(Screen.Width-Width)/2
label1="拷贝"&Mid$(Command$,InStr(Command$,"") 1)&"到你的硬盘..."
Visible=True
Refresh
FileCopyMid$(Command$,InStr(Command$,"") 1),Left(Command$,InStr(Command$,"")-1)
EndIf
'开始程序
x=Shell(Left(Command$,InStr(Command$,"")-1),3)
End
ExitSub
errorhandler:
IfErr=53Then'文件没有
ResumeNext'还是要拷贝
Else
MsgBox"错误#"&Err&Chr(10)&Error&Chr(10)&"结束"
End
EndIf
ExitSub
EndSub->
[]
更多精彩
赞助商链接