Search Tools Links Login

CopySelf


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

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 92 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.