Extracting files from an executable with the command prompt

skweebl

New member
Hello everybody. I have what I thought should be a relatively straightforward question: What do I type in the command prompt in Win7 to extract all the files from inside an .exe? I remember doing it once a long while back, but I forgot how and Google is being especially unhelpful.

One result instructed me to navigate to the file's location and type:

filename.exe /A /P C:\destinationfolder

but that didn't work. I assumed it was for an older Windows version. Google got its hit from a comment saying it didn't work on Win7... Can anybody help?
 

My Computer

Computer Manufacturer/Model Number
Dell Inspiron 1318
OS
windows 7 ultimate
CPU
Intel Core 2 Duo 2.00ghz
Memory
2 GB
Graphics Card(s)
Intel GMA X3100 Integrated
Hard Drives
Single 150 GB
Most archive-related programs (i.e. 7zip, WinRAR, etc.) have a command-line capability. You can also use unzip.exe.

There is also the Microsoft self-extractor, see this page for description.
 

My Computer

Computer Manufacturer/Model Number
Dell Inspiron 530
OS
Windows 7 Ultimate (x64)
CPU
Q6600
Memory
8 GB
Graphics Card(s)
ATI Radeon HD 2600 XT
Monitor(s) Displays
Samsung Syncmaster P2450
Screen Resolution
1920x1080
Hard Drives
Samsung HD103UJ
Samsung HD501LJ
Internet Speed
25 Mb/s
The usual way I do it is to use winrar or 7z (or whatever decompression utility you have installed). E.g. when I right click on an .exe I may get the option to extract files to... with winrar. But that doesnt work all the time. In that case try using Universal Extractor.
 

My Computer

Computer Manufacturer/Model Number
Too many to describe...
OS
Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
First of all, not all .exes have files that can be extracted. Only those .exes that are SEAs (self-extracting archives) have files to be extracted.

If you want to extract ALL of the files from an SEA the simplest method would be to simply execute the .exe which will do it's thing and extract all of the files within. If you wanted to extract only certain files from the SEA then I could see using some of the 3rd party apps previously suggested.

What happens when you simply try to run the .exe? It's possible that the SEA was created for an OS like Win95 or DOS and the embedded version of archiver won't run from within Win 7.

Are you sure the file you are trying to extract is an SEA?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Built desktop, Dell G15 5511 Gaming laptop,MS Surface Pro 7 tablet
OS
W10 Pro desktop, W11 laptop, W11 Pro tablet (all 64-bit)
CPU
3.7Ghz 8700K i7, i7-11800H, i7-1065G7
Motherboard
ASUS TUF Z370-Pro Gaming in desktop
Memory
16G desktop, 16G laptop, 4G tablet
Graphics Card(s)
AMD Radeon RX580, RTX 3060, Intel Iris Plus
Sound Card
High Definition Audio (Built-in to mobo)
Monitor(s) Displays
Samsung U32J59 32" (2x), 15.6", 12"
Screen Resolution
3840x2160, 3840x2160, 1920x1080, 2160x1440
Hard Drives
500G SSD for OS; 2T, 10T & 15T HDDs for Data on Desktop, 1TB SSD laptop, 128G SSD tablet.
PSU
Corsair CX 750M
Case
Antec 100
Cooling
CM 212+
Keyboard
IBM Model M - used continuously since 1986
Mouse
Microsoft Pro IntelliMouse
Internet Speed
400M down 8M up
Antivirus
Windows Defender
Browser
FireFox
Other Info
Built my first computer (8Mhz 8088cpu, 640K RAM, 20MB HDD, 2 360K floppy drives) in 1985 and have been building them for myself, relatives and friends ever since.
Wow, thanks for all the responses guys. Strollin, it was a video driver .exe. There was no .zip version of the file available (at least, I didn't see one, even though there normally is), and I couldn't install it with a .exe version because my laptop is a Dell, and it only accepts Dell drivers despite those being much older than the Intel ones. They must be installed manually.

Anyway, WinRar was able to do it. I could have sworn there was a way to do it via the command prompt, though. Thank you for your help everyone :]
 

My Computer

Computer Manufacturer/Model Number
Dell Inspiron 1318
OS
windows 7 ultimate
CPU
Intel Core 2 Duo 2.00ghz
Memory
2 GB
Graphics Card(s)
Intel GMA X3100 Integrated
Hard Drives
Single 150 GB
Old thread but wasn't answered....

I could have sworn there was a way to do it via the command prompt, though. Thank you for your help everyone :]

you are correct there is a way to do it via command line.
Found it here you go:

Ensure proper permissions are in place on the destination directory...
PHP:
C:\executible_To_Extract.exe -nos_o"C:\destination_Directory" -nos_ne

What I''ve used to extract adobe reader exe's for msi deployment. Hope it comes in handy to others out there.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 64 & 32bit + Windows 8.1 64bit
Back
Top