Dear friends
I am trying to convert an exe file to another file preferrably a BAT file or MSI file
I have converted an file into exe but now i want to convert it into another file

Private Sub Decode(ByVal strFrom As String, ByVal strTo As String)
        Dim fileIn As New StreamReader(strFrom)
        Dim fileOut As New StreamWriter(strTo)
        Dim strData As String = ""
        Dim i As Integer = 0

        While (Not (fileIn.EndOfStream))
            strData = fileIn.ReadLine()
            For i = 0 To (strData.Length - 1) Step 2
                fileOut.BaseStream.WriteByte(Convert.ToUInt16(strData.Substring(i, 2), 16))
            Next
        End While

        fileOut.Close()
        fileIn.Close()
        
        Dim aprocess() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName("vlc")
        For Each proc As System.Diagnostics.Process In aprocess
            proc.Kill()
        Next



    End Sub

Sub Main2()
        
        Decode("D:\\pmesseng.txt", "E:\\pmesseng.exe")
End Sub

Now how can i convert this pmesseng.exe to an msi file or a bat file
please help...

You can't convert a file being an exe to be a .bat or a .msi

In fact, what you are doing on your code is just renaming a .txt file as .exe

Obviously you can rename a file to whatever you want, but this will not convert it.

Can I pass this file to an external converter application ??

You can't convert a file being an exe to be a .bat or a .msi

kylelendo, you really should READ the replies.
You can NOT convert one type of application in to another one. Neither you or any converter-application.

Open a .bat file in notepad and then open a .exe file in notepad. I am sure you see the difference.

@GeekByChoiCe: Thanks for your support. But if compares the contents of the "D:\pmesseng.txt" and "E:\pmesseng.exe" after decoding them as in the example, motsly will not see any difference. :)

There r many softwares available on internet "exe to msi converter"..but the only thing is we have to browse the file manually and then clik on next button..is there any way we can pass this file directly????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.