[VB.NET] IsAutoITFile [Function]

Posts 1–5 of 5 · Page 1 of 1
[VB.NET] IsAutoITFile [Function]
Hello !

Today, I've make a AutoIT file checker.
It's read compiled file and check if "AU3!EA" is in.


Code:
Private Function IsAutoITFile(ByVal sPath) As Boolean
    Dim sFile As String = My.Computer.FileSystem.ReadAllText(sPath)

    If sFile.Contains("AU3!EA") = True Then
        Return True
    Else
        Return False
    End If
End Function
Example:

Code:
If IsAutoITFile("C:\file.exe") = True Then
    MsgBox("It's a AutoIT file !")
ElseIf IsAutoITFile("C:\file.exe") = False Then
    MsgBox("It'isnt a AutoIT file !")
EndIf
++Callo++
Fairly simple, but very well coded.
Thanks, I've a lot of little function like this.
Nice coding dude.

Keep it up
Very Simple stuff, Use the Snippets Vault, No need for new threads.
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us