CopySelf
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
Copy itself to a location specified.
Original Author: k0nsl
Assumptions
There's really nothing to know about this function other than that it can copy itself to a location specified...
Code
'*needs to be compiled before it copies its self
Public Sub CopySelf(Path As String, NewName As String)
MyPath = App.Path & "" & App.EXEName & ".EXE"
NewLocation = Path & "" & NewName
On Error Resume Next
If LCase(MyPath) <> LCase(NewLocation) Then
FileCopy MyPath, NewLocation
End If
End Sub
Private Sub Form_Load()
Call CopySelf("C:", "bleh.sys")
End Sub
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.