Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

parrothead

macrumors 6502a
Original poster
Sep 24, 2003
644
0
Edmonds, WA
The short: I am trying to get to files that are stored in .exe files.

The long: I have volunteered at the forums at the simtropolis website, for players of Sim City 4, to "repackage" .exe installers that they use there. Basically, there are many people over there creating new buildings, lots, etc, and instead of just providing the actual files (which need to be placed in a plugins folder in the SC4 directory) they are making .exe installers that automatically place the files. I need some way to get into the .exe's and extract the files out of them. So far I have been using my work PC to run the installers, search out the files, put them in a folder and then zip or stuffit them. There's gotta be an easier way, and a way that wont get me in trouble at work!

Thanks.

Edit: No I dont have Virtual PC, and that wouldn't matter, I am looking for a solution I can pass on to other Mac users at Simtropolis.
 

vocaro

macrumors regular
Mar 5, 2004
120
0
parrothead said:
Basically, there are many people over there creating new buildings, lots, etc, and instead of just providing the actual files (which need to be placed in a plugins folder in the SC4 directory) they are making .exe installers that automatically place the files.

Tell them to quit doing that. There's little reason not to use the standard ZIP format, which is supported by both Windows and Mac out of the box. To make matters worse, Trojan Horses often masquerade as EXE files, so all they're doing is flagging their packages as potential viruses.

parrothead said:
No I dont have Virtual PC, and that wouldn't matter, I am looking for a solution I can pass on to other Mac users at Simtropolis.

Unless you have VirtualPC or some other emulator that can execute x86 instructions on the Mac, you're out of luck. Now, it may be possible to extract the files if you know what program created those EXEs, and this program has a Mac OS X version that can extract the EXE files it created, but this is unlikely.
 

26139

Suspended
Dec 27, 2003
4,315
377
Yeah...

In agreeance with the previous poster, this is nearly impossible without Virtual PC. .exe are x86 (windows) program files that will NOT work with the Mac operating system.
Tell whomever is encoding these exe files to stop, it makes it too easy for some hacker to drop an exe virus file masquerading as Sims stuff.
 

parrothead

macrumors 6502a
Original poster
Sep 24, 2003
644
0
Edmonds, WA
Thanks for your replies. I was sure this would be the case, but you never know until you ask right? As far as telling them to stop with the .exe stuff, I would have about as much success as if I asked Steve J. to bring back the Newton. They are dead set against going back. All the Mac members have complained about it, and all that happens is they get called names and the PC fanboys spout anti mac propaganda. Ah well, ce'st la vie.
 

26139

Suspended
Dec 27, 2003
4,315
377
Yeah...

It's not just a mac compatibility problem, it's also a security issue. exe files can do just about anything....

To be honest, they are just showing off. There is no need to write a program that puts the sims plug-ins in the correct folder, it is simply a minor convenience.
 

AdamR01

macrumors 6502
Feb 2, 2003
259
9
You could try renaming the file to .zip instead of .exe and then use your mac to extract them. This may work if the files are zip exes. You could also use WinRAR on a pc to save you some steps. If you use WinRAR you may be able to extract the contents of the exe into a folder.
 

gekko513

macrumors 603
Oct 16, 2003
6,301
1
appleretailguy said:
In agreeance with the previous poster, this is nearly impossible without Virtual PC. .exe are x86 (windows) program files that will NOT work with the Mac operating system.
Tell whomever is encoding these exe files to stop, it makes it too easy for some hacker to drop an exe virus file masquerading as Sims stuff.
Nearly impossible?? I think not. It could be quite easy depending on how they do it. If all the .exe files are built in a similar way it shouldn't be much of a problem to extract the relevant data unless it is encrypted or compressed in a non-standard way.

However, I agree that this should never have been put in .exe files in the first place.
 

jamdr

macrumors 6502a
Jul 20, 2003
659
0
Bay Area
.exe's are compiled, binary instructions. It really would "impossible" to extract the desired data because it is almost certainly compressed. I'm pretty sure all installers compress data.
 

gekko513

macrumors 603
Oct 16, 2003
6,301
1
jamdr said:
.exe's are compiled, binary instructions. It really would "impossible" to extract the desired data because it is almost certainly compressed. I'm pretty sure all installers compress data.
Like I said, it would be quite easy to extract if it's compressed in a standard way.
 

tersono

macrumors 68000
Jan 18, 2005
1,999
1
UK
jamdr said:
.exe's are compiled, binary instructions. It really would "impossible" to extract the desired data because it is almost certainly compressed. I'm pretty sure all installers compress data.

As the other poster mentions, SOME .exe installers are simply self-extracting .zip files and will open in Stuffit Expander if you either change the extension or just drag and drop 'em onto Expander's icon.

If that doesn't work, however, then you're out of luck - there's no way to handle a Windows binary .exe installer natively on the Mac.
 

gekko513

macrumors 603
Oct 16, 2003
6,301
1
OK ... This does not seem to get through, but I'll try again. It doesn't have to be a self extracting zip .exe file to make it work.

Yes, a .exe is a binary file with x86 instructions. But it also contains data, and we're not interested in the instructions in this case, but the data.

If all these binary files are built in a similar manner it could be possible to extract the data even if it's not a standard zip .exe.

Step 1: Analyse the .exe file with a hex-viewer or in a debugger while it's running. The goal is to find out where the data lives.
Step 2: Find out if it is possible to build a pattern for a binary search for the beginning of the data we want or for the structure directly preceeding the data.
Step 3: Identify the structure and length of the data. The length can be found by searching for a binary pattern like in step 2, or through some structural length fields. If there are any control structures they must be stripped away.
Step 4: Identify any compression or scrambling. The data could be compressed or scrambled. If the methods that are used aren't too sophisticated they can be reversed.
Step 5: Build a Mac OS X app that does this automatically.
 

MisterMe

macrumors G4
Jul 17, 2002
10,709
69
USA
gekko513 said:
OK ... This does not seem to get through, but I'll try again. It doesn't have to be a self extracting zip .exe file to make it work.

Yes, a .exe is a binary file with x86 instructions. But it also contains data, and we're not interested in the instructions in this case, but the data.

If all these binary files are built in a similar manner it could be possible to extract the data even if it's not a standard zip .exe.

Step 1: Analyse the .exe file with a hex-viewer or in a debugger while it's running. The goal is to find out where the data lives.
Step 2: Find out if it is possible to build a pattern for a binary search for the beginning of the data we want or for the structure directly preceeding the data.
Step 3: Identify the structure and length of the data. The length can be found by searching for a binary pattern like in step 2, or through some structural length fields. If there are any control structures they must be stripped away.
Step 4: Identify any compression or scrambling. The data could be compressed or scrambled. If the methods that are used aren't too sophisticated they can be reversed.
Step 5: Build a Mac OS X app that does this automatically.
You may enumerate your point until the cows come home. However, that does not change the facts. In the single instance of a self-extracting ZIP file, you can extract the data. However, there are other less open archive formats used in Windows. The executeable code in these kinds of file is quite small. However, if you don't understand the compression format, you are SOL. I find it laughable that you throw around the notion that if we understand the structure of the archive, we can extract the data. I was always told that if a frog had wings, he wouldn't bump his rear. I mean, come on! When was the last time that any two Windows developers agreed on anything? The embedded data format in executeable files? Dream on.
 

DavidLeblond

macrumors 68020
Jan 6, 2004
2,323
600
Raleigh, NC
MisterMe said:
You may enumerate your point until the cows come home. However, that does not change the facts. In the single instance of a self-extracting ZIP file, you can extract the data. However, there are other less open archive formats used in Windows. The executeable code in these kinds of file is quite small. However, if you don't understand the compression format, you are SOL. I find it laughable that you throw around the notion that if we understand the structure of the archive, we can extract the data. I was always told that if a frog had wings, he wouldn't bump his rear. I mean, come on! When was the last time that any two Windows developers agreed on anything? The embedded data format in executeable files? Dream on.

Its highly unlikely that the dev would have written his own installer. Either its a ZIP file or its Installshield I'm betting. I know you can read ZIP file EXEs on the Mac, and I'd be surprised if you couldn't read CAB files.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.