Swizzley
14th December 2009 01:13 UTC
ARJ Extraction ?
I'm writing an installer that needs to extract a few arj files at the end. How would this be done?
I'm guessing with a DOS unarj utility executed through a plugin like ExecDOS? Anyone have any example code that might help me understand this?
redxii
14th December 2009 05:35 UTC
I'd use the 7zip command-line: http://www.7-zip.org/download.html
SetOutPath "$PLUGINSDIR"
File 7za.exe
nsExec::Exec '"$PLUGINSDIR\7za.exe" x "<path to archive>" -y -o"<extraction path>"'
Extracting the files and including them in your installer might also work.
Swizzley
14th December 2009 22:22 UTC
Unfortunately this specific arj archive can't be opened with the command line version of 7zip, and including them in the installer is not an option.
The archive can be opened with unarj, but the program is very limited (it will only extract the files to the directory it is in).
The following works for me in Windows XP, but not in Vista. I have RequestExecutionLevel admin set.
Section -UNARJ
SetOutPath $INSTDIR
nsExec::execToLog '"$INSTDIR\unarj.exe" x REDNECK.INS'
SectionEnd
On Vista it seems to just skip running the program as I get no feedback from it in the log. Any ideas?
Swizzley
15th December 2009 00:45 UTC
I think I just figured it out. I'm running a 64 bit version of Windows Vista which unarj is not compatible with.
I can think of a few workarounds, but none of them are very good... As I would like the install process to do everything automatically for the end user.
redxii
15th December 2009 20:52 UTC
Try the command-line included with WinRAR (not their DOS one listed as a separate download). It's not a free program so I don't know if you would be allowed to include it in your installer.
MSG
16th December 2009 08:34 UTC
You could also try unrar.dll through the system plugin, but I never figured out how to make that work. If I remember correctly, I was unable to find documentation for the dll. Also I can't remember whether it's a free redistributable or not.
Probably a better idea is to try unarj32.dll. It's Japanese, but it should be relatively well documented even in English.