tags:

views:

221

answers:

7

Hi guys I made a program using VB and I lost all the codes but I had the exe file how i can extract the codes from the exe ?

+10  A: 

Assuming your exe is a .NET assembly (you tagged the question as VB.NET), you can reverse engineer your exe using tools such as Reflector.

Jakob Christensen
<-- this. It absolutely is possible - I've had to do it - and once again red gate are awesome. You can even convert it into C#...
annakata
Good to know in the future :-)
gernberg
@annakata - Lutz Roeder (reflector author) is awesome, Red Gate are generous to keep a free version. Credit where credit is due!
Stevo3000
Yeah- you might want to look at using FileGenerator for this approach: http://www.codeplex.com/FileGenReflector
RichardOD
Redgate took over Reflector from Lutz Roeder. So he is the actual hero :-)
Jakob Christensen
Now hopefully you didn't obfuscate the assembly...
OregonGhost
You know I did wonder about that (since my app says Lutz Roeder all over it) - I just assumed he worked at red gate or something. Ah well, they're both awesome.
annakata
+1  A: 

Use Reflector (assuming .NET) to dissassemble the exe back into code. You will need to create your own class structure, but you can recover the code as any of the supported CLR languages.

Stevo3000
+4  A: 

If it's VB.NET you can use the RedGate Reflector tool and the FileDisassemler plugin to generate the source code. That is if the exe was not obfuscated

Conrad
A: 

Have you tried Salamander, or one of the many other .net decompilers?

Binary Worrier
A: 

Trey VB Decompiler and see if that works.

Steven
+3  A: 

Since you tagged your question vb.net you might be able to retrieve quite some portions of your code using a .NET disassembler. For example try Lutz Roeder's .Net Reflector or MS ildasm which comes with the .NET compiler.

merkuro
+3  A: 

Jakob definitely has the write answer for getting your code back as fast as possible.

However once you have it back you should take steps to ensure that you don't ever hit this situation again. The best way is to use a form of Source Code Control to manage the code for your programs. Having the code stored in several places makes it harder for you to lose in the future.

For personal projects I would try one of the following

JaredPar