Jump to content
Tuts 4 You

[Help] About the patch and overwrite the file in VB.NET 2008


inloves

Recommended Posts

Posted (edited)

I have this problem need help, I created a button in VB.Net, then I make the following code

VB.NET 2008:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FileOpen(1, My.Application.Info.DirectoryPath & "\file.exe", OpenMode.Binary)
FilePut(1, &H5003C0, &H7600)
FileClose(1)

This code will make the process as follows:

First it will download a file (file.exe) to specify its path with the old file.exe will then open this file and overwrite.

But here it just file.exe changed from old to new file.exe a new file, but does not override

Please help me about this code in VB.NET 2008

Here's the code in VB6, it successfully implemented

VB6:

Private Sub Button1_Click()
Open App.Path & "\file.exe" For Binary As #1
Put #1, &H5003C0, &H760
Close #1
Edited by inloves

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...