x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Automating extraction of cabs from installer .exes

Karpour Page Icon Posted 2023-07-05 9:37 PM
#
Avatar image of Karpour
Subscribers
H/PC Philosopher

Posts:
440
Location:
Austria
Status:
The previous post about getting cabs out of exe's got me thinking. I'm already working for a while to build tools to get ALL the information out of CE applications, regardless of how they are packaged.

In case of setup.exes there are mostly 3 cases:

1. The .exe can be opened as a zip archive, in this case the contents can be extracted and usually cabs are in there
2. The .exe is an installshield installer, in this case, unshield can be used to extract the cabs
3. The .exe is some proprietary installer, this is where it gets harder.

For automating extracting the .exes, my thinking was as follows:

We have a VirtualBox VM, with a minimal Windows XP install. Installed are ActiveSync and an FTP server, both are started. There's also a snapshot which always puts the entire machine in the same initial state.

The workflow for extracting the data from my application would be.

1. The app starts the VM if not already started.
2. The VM is set to the initial state via snapshot restore.
3. The .exe file is uploaded via FTP
4. The .exe file is executed and through sending simulated keystrokes via remote commands, hopefully gets to a point where the files are extracted.
5. As soon as files are extracted, the application downloads them via FTP from the ActiveSync directory.

Please let me know what you think of this approach, I'm open to better ideas

My code so far is here, it's a bit of a mess, but I'm making good progress: https://github.com/karpour/windows-ce-repo
 Top of the page
C:Amie Page Icon Posted 2023-07-06 11:26 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
It's going to be 'fun' trying to develop an AI macro that can tick EULA license boxes, navigate all the different legacy installer technologies (old Microsoft 90's installer wrappers) and spit out the CAB correctly at the end of it.

Some potential issues that spring to mind:
- Apps that don't install into the ActiveSync repo directory but get lost under program files or in the Windows directory
- CE 1.0x apps won't work this way for obvious reasons
- The (very rare) app installer that is hard coded to need CE services and moans about finding ActiveSync - https://www.hpcfactor.com/support/cesd/200269/cannot_install_microsoft_activex_data_objects_sdk_v20_due_to_setup_could_not_find_windows_ce_services_20_error/
- Some app installers will return a fail code if the CE device wasn't connected / no partnership exists so you may not be able to know that extraction completed based upon the process return code. You would probably need to put a watch on Program Files / ActiveSync's repo.
- Anything requiring license key entry

How many apps have you currently got that are in need of this treatment? Is it few enough that the community can help and we can submit them both to you as well as to the SCL at the same time or is your intent to release the code to allow others to automate this?
We really should marry up the SCL and your projects you know!
 Top of the page
Jump to forum:
Seconds to generate: 0.187 - Cached queries : 40 - Executed queries : 29