"Unextract" Converted Batch Files

Have you ever wondered how to do something in batch that someone has already done and wrapped it nicely in a little .exe file? Some people like to keep their batch programming secrets to themselves, and don't want to share, so then convert their batch file to .exe. But you can't discover their secrets if they have converted it to .exe, because all you will find is gibberish.

Before I will tell you how to "unextract" an .exe, you must now how ".bat to .exe" programs work. What they basically do is "wrap" a batch file with an executable; think about a Christmas present. Pretend the gift inside is the secrets of the batch file, and the wrapping on the outside is like the executable, which prevents you from "seeing" the secrets inside. But this is no ordinary present, the wrapping on the outside can not be torn or opened, you must press a button in order to to "unwrap" it. But when it "unwraps", it shows you what it is, but hiding the secrets.

If you couldn't fully understand that, here is what actually happens. Try to compare the two.
Batch files in executable form cannot be viewed as the batch language. If you open it in notepad, you will get a whole bunch of symbols. In the philosophy above, pressing the "button" is the same as opening the file as an executable. It opens just like a batch file, but if you try to edit it, you won't be able to read it. What the executable does, is temporarily extracts the batch file within it, to a temp folder.

Now to the "how to" part. Here is where that "temp" (temporary) folder is:
%userprofile%\Local Settings\Temp
Now all you have to do is copy and paste that into a windows explorer address bar. You will now be in a temp folder where the batch file will be dumped. Now you have to run the .exe file. But now you do have to get your hands dirty (virtually!). Search in each folder till you find a batch file, most commonly called batchfile.bat. Simply right click, press edit, and your in!

So that's how to "unextract" a converted batch file! (note: I didn't make it an instructible because, well, no one likes a one step instructable!)

Good Luck!

bat_to_exe_converter-78238.png
9 comments
sort by: active | newest | oldest
Apr 25, 2010. 1:57 AMRedFlash says:
You could just open 7zip and right click on the exe and hit Open inside.
Apr 25, 2010. 2:00 AMRedFlash says:
oops, just tried it. comes up with three files that contain absolutely nothing
Dec 14, 2008. 1:48 PMfwjs28 says:
cool....i always wondered how to "unextract" a .exe....
Dec 12, 2009. 3:10 PMlemonie says:
It only works on .bat that have been converted to .exe with Bat to Exe converter.

L
Dec 12, 2009. 3:22 AMlemonie says:
Are you talking about getting back to the original .bat you converted to .exe in the first place?

L
Dec 12, 2009. 3:06 PMlemonie says:
That's interesting. The builder must pack it into some kind of self-extracting archive rather than actually compile the commands into executable code?

L
Dec 11, 2009. 10:44 PMEl Mano says:
Where'd you fing the batch converter?
Mar 25, 2009. 6:45 PMgonturan says:
Hmmm, this doesn't seem to work on PiFast43. Oh, an easier way to sort is to arrange the files by date and then look in the most recently modified one.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!