Jump to content

Universal Extractor


nitro322

Recommended Posts

I'm using uniextract from the "SendTo" menu, I added a link to it: ("C:\Documents and Settings\User22\SendTo\Universal Extractor.lnk")

I click the context menu, Send to, Universal extractor, the universal extractor dialog box appears as shown in the picture. I press OK.

Ok, I found the problem. It's actually a couple different issues that combine to cause the crash, which is why I never saw it before.

As you know, UniExtract first tries to use isxunpack to extract an InstallShield installer. If that fails, it then prompts the user to try the cache method. Although UniExtract is crashing after trying the cache method, the issue actually occurs during the isxunpack stage. isunpack does not allow me to specify the output directory, so to work around that I move the file to the output directory, attempt to extract it from there, then move it back right after the attempt. Ordinarily this will work fine, but it turns out that it will fail if extracting a file from the root directory of a drive (C:, D:, etc.). Annoyingly, Windows requires a backslash at the end of the target directory name when copying/moving files to a root directory, even though any other directory will work fine. To illustrate:

move c:\old\test.exe c:\new\
move c:\old\test.exe c:\new
move c:\old\test.exe c:\
move c:\old\test.exe c:

The first three cases work fine and the file is moved as expected. The last, however, does not, and the file is left behind in the old directory. This is essentially what's happening for you.

Now, the crash issue occurs at the next step. UniExtract knows that extraction failed, thinks it moved the file back to its original location, and procedes to try the cache method. However, when it tries to execute the file, it crashes because it's not found.

Whew. :)

So, now I need to spend yet more time working around Windows filesystem inadequacies. Yay. Thanks for reporting the issue - I'll make sure it works properly before the final release.

Link to comment
Share on other sites


Why "move" and not "copy"? Whatever happens during (attempted) extraction, the original file would still be in it's location. The worst that could happen would be to be left with two copies of the files. Right now the alternative is the file may be left in a different location, unknown to the user and a hardware failure of some sort may lose or corrupt the file.

The only issue would be when manipulating huge files while free space is scarce.

Link to comment
Share on other sites

Why "move" and not "copy"?

I thought about that, and the basic reason is speed. One of the InstallShield test files I use is the installer for Alien Arena. It's over 100 MB, and copying that file to another directory, whether short on disk space or not, takes a while. Given that this is for purely temporary purposes, I think simply moving the file then moving it back is the easiest and fastest.

Of course, I do understand your point: if some part of the move/move back process fails for any reason, then the file would be left in the "output" directory, which could certainly cause confusion for the end user. However, this method has been in use since Universal Extractor 1.0 (and I think 0.8 as well, though I'm not sure), and Perch's issue was the first reported time this process process had failed. I think that's a pretty good record on its own, and I've since fixed the cause of his problem so the root directory issue will no longer be a problem. So, I feel the risk of move/losing a users file due to program failure is minimal enough that the significantly faster move process is safe to use.

Great question, though. :)

Link to comment
Share on other sites

Moving the source file between two locations on the same partition is indeed quick. But moving it between two different partitions would require the same amount of time as copying it, I assume.

Moreover, if the source file is somehow locked by another running application - some file sharing apps do that, AFAIK - then the operation would fail.

I may be wrong here in my assumptions, but if I'm right, maybe an option called "Use a copy of the file" (or similar) could come in handy in the above-mentioned situation or just for safety. ;)

Link to comment
Share on other sites

I just came across your great!!! tool today. It has already saved me a lot of time.

Thanks!!!

Will 1.5 have a single context menu item with submenu (like winzip and other handy tools)?

I saw a mention of this in earlier posts.

I really like the single menu item approach. As a developer I have many tools hanging off my context menu and it is very nice when the tool uses a submenu to keep the clutter down. Also, this would free you to add more methods of execution!!

Again, thanks, for this very useful tool!

Link to comment
Share on other sites

I almost forgot...

Is it possible to silently install UniExtract?

I saw somewhere a /VERYSILENT switch, but I need to control the installation directory path as well.

The default preferences are fine, but can they also be set differently for a silent install?

Link to comment
Share on other sites

it uses innosetup.

Inno Setup ® Installer.

setup.exe /Option

Install Options
/LOADINF="filename"
Instructs Setup to load the settings from the specified file after having checked the command line. This file can be prepared using the '/SAVEINF=' command as explained below.
Don't forget to use quotes if the filename contains spaces.
/SAVEINF="filename"
Instructs Setup to save installation settings to the specified file.
Don't forget to use quotes if the filename contains spaces.
/LANG=language
Specifies the language to use. language specifies the internal name of the language as specified in a [Languages] section entry.
When a valid /LANG parameter is used, the Select Language dialog will be suppressed.
/DIR="x:\dirname"
Overrides the default directory name displayed on the Select Destination Location wizard page. A fully qualified pathname must be specified.
/GROUP="folder name"
Overrides the default folder name displayed on the Select Start Menu Folder wizard page. If the [Setup] section directive DisableProgramGroupPage was set to yes, this command line parameter is ignored.
/NOICONS
Instructs Setup to initially check the Don't create any icons check box on the Select Start Menu Folder wizard page.
/NOCANCEL
Prevents the user from cancelling during the installation process, by disabling the Cancel button and ignoring clicks on the close button. Useful along with '/SILENT' or '/VERYSILENT'.
/COMPONENTS="comma separated list of component names"
Overrides the default components settings. Using this command line parameter causes Setup to automatically select a custom type.
/TASKS="comma separated list of task names"
* Applies to Inno Setup version 5.1.4, and above.
Specifies a list of tasks that should be initially selected or deselected. To deselect a task, prefix its name with a "!" character.
Only the specified tasks (and their children) will be selected; the rest will be deselected. Use the /MERGETASKS parameter instead if you want to keep the default set of tasks and only select/deselect some of them.
Examples:
Deselect all tasks, then select the "desktopicon" and "fileassoc" tasks:
/TASKS="desktopicon,fileassoc"
Deselect all tasks, then select a parent task item, but exclude one of its children:
/TASKS="parent,!parent\child"
/MERGETASKS="comma separated list of task names"
* Applies to Inno Setup version 5.1.4, and above.
Like the /TASKS parameter, except the specified tasks will be merged with the set of tasks that would have otherwise been selected by default.
If UsePreviousTasks is set to yes, the specified tasks will be selected/deselected after any previous tasks are restored.
Examples:
Keep the default set of selected tasks, but additionally select the "desktopicon" and "fileassoc" tasks:
/MERGETASKS="desktopicon,fileassoc"
Keep the default set of selected tasks, but deselect the "desktopicon" task:
/MERGETASKS="!desktopicon"
/PASSWORD=password
Specifies the password to use. If the [Setup] section directive Password was not set, this command line parameter is ignored.
When an invalid password is specified, this command line parameter is also ignored.
Display Options
/SP-
Disables the This will install... Do you wish to continue? prompt at the beginning of Setup. Of course, this will have no effect if the DisableStartupPrompt [Setup] section directive was set to yes.
/SILENT
/VERYSILENT
Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option explained above)
If a restart is necessary and the '/NORESTART' command isn't used (see below) and Setup is silent, it will display a Reboot now? message box. If it's very silent it will reboot without asking.
/SUPPRESSMSGBOXES
Instructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'.
The default response in situations where there's a choice is:
Yes in a 'Keep newer file?' situation.
No in a 'File exists, confirm overwrite.' situation.
Abort in Abort/Retry situations.
Cancel in Retry/Cancel situations.
Yes (=continue) in a DiskSpaceWarning/DirExists/DirDoesntExist/NoUninstallWarning/ExitSetupMessage/ConfirmUninstall situation.
Yes (=restart) in a FinishedRestartMessage/UninstalledAndNeedsRestart situation.
5 message boxes are not suppressible:
The About Setup message box.
The Exit Setup? message box.
The FileNotInDir2 message box displayed when Setup requires a new disk to be inserted and the disk was not found.
Any (error) message box displayed before Setup (or Uninstall) could read the command line parameters.
Any message box displayed by [Code] support function MsgBox.
Restart Options
/NORESTART
Instructs Setup not to reboot even if it's necessary.
/RESTARTEXITCODE=exit code
Specifies the custom exit code that Setup is to return when a restart is needed. Useful along with '/NORESTART'.
Logging Options
/LOG
Causes Setup to create a log file in the user's TEMP directory detailing file installation and [Run] actions taken during the installation process. This can be a helpful debugging aid. For example, if you suspect a file isn't being replaced when you believe it should be (or vice versa), the log file will tell you if the file was really skipped, and why.
The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)
The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.
/LOG="filename"
Same as /LOG, except it allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Setup will abort with an error message.
CMenu Options
AutoIt Usage
Template AutoIt Script, requires no recording.
Create the Au3 template script.
Edit any variables at the start of the script, and and shortcuts, that require deletion.
Refer to the CMenu Help Guide. It displays sample highlighted items, to edit.
Compile the script, into an exe, and keep it with the installer.
Run the compiled exe, to install.
;
If recorded with CMenu, the ProgramName.inf is saved to the installer directory.
Command line Usage
Record an installation. Change filenames in command, to suit.
Setup.exe /SAVEINF="c:\ProgramName.inf"
The ProgramName.inf is saved to the root of c:\ drive, as to above command.
But, CMenu record will save the ProgramName.inf to the installer directory.
To silently install, use:
Setup.exe /VERYSILENT /SP- /LOADINF="Full Address to\ProgramName.inf"
You can add more parameters, as required.
;
Or not record the install, and use parameters above, to the commandline.

Get yourself a hold of CMenu or SendToA3X by Michael Heath any of these will help identify switches :rolleyes:

http://uawiki.org/CMenu/

Edited by urie
Link to comment
Share on other sites

Moving the source file between two locations on the same partition is indeed quick. But moving it between two different partitions would require the same amount of time as copying it, I assume.

Moreover, if the source file is somehow locked by another running application - some file sharing apps do that, AFAIK - then the operation would fail.

I may be wrong here in my assumptions, but if I'm right, maybe an option called "Use a copy of the file" (or similar) could come in handy in the above-mentioned situation or just for safety. ;)

Again, you have a good point. I'll consider adding this option to the next version. For now, though, I'm just waiting on a few more translations before releasing 1.5 final, so I don't want to make any more "feature" changes that may delay the release even longer (if that's even possible at this point... sigh).

Will 1.5 have a single context menu item with submenu (like winzip and other handy tools)?

I'd like to make this an option, but at this point it'll have to remain on the long-term todo list. The situation hasn't changed any since the last time it came up.

You may want to check out urie's suggestion, though. I played briefly with CMenu a while back, and I think you can make it do what you want. It's a pretty nifty little program.

Is it possible to silently install UniExtract?

As urie pointed out, it is indeed built with Inno Setup. In addition to the syntax help he posted, you can also simply run the installer with a '/?' switch. This will display a list of all standard Inno Setup options (pretty much the same thing as urie posted) as well as all of the custom tasks and parameters supported by UniExtract. This isn't a standard feature of Inno Setup, though; I added it using my Inno Setup CLI Help script.

<not-so-shameless-plug>Actually, any package developers can very easily add this same kind of help information to their Inno Setup installer by using this script. As a developer it doesn't really benefit you any, but from a user's perspective it's immensely useful to have a detailed list of command line options readily available for any given program. That's the main reason I wrote it to begin with - I want other package developers to start using it as well, so that I, as an end-user, can benefit from it. :D If you write any applications that use Inno Setup for the installer, consider checking it out.</not-so-shameless-plug>

Link to comment
Share on other sites

Will 1.5 have a single context menu item with submenu (like winzip and other handy tools)?

I'd like to make this an option, but at this point it'll have to remain on the long-term todo list. The situation hasn't changed any since the last time it came up.

mmm why that? isn't it a very simple option to add? I think it's just a few lines of coding :)

if not and i'm wrong sorry, please forgive me but i'm not a programmer :P

Edited by provolino
Link to comment
Share on other sites

mmm why that? isn't it a very simple option to add? I think it's just a few lines of coding :)

I don't know how many lines of coding it would require. The issue is not implementation time, it's implementation method. Creating a cascading context menu, as far as I can tell, requires a shell extension DLL. Doing this, again as far as I can tell, requires the use of the commercial version of Visual Studio (it requires MFC components, which are not included in the Express edition). There are three problems with this:

1) I write free, open source software; I'm really not interested in buying a commercial application to do it

2) Because I write free, open source software, I feel that requiring a commercial compiler to modify the code would largely defeat the point of the license

3) I primarily write scripts, not system libraries; doing something like this would be a completely different experience

Now as I've said in the past, if anyone is willing to help out and/or contribute such an extension for UniExtract, I'd be more than happy to include it. That's not very likely, though, so for now it'll remain on my list of long-term goals.

Link to comment
Share on other sites

mmm why that? isn't it a very simple option to add? I think it's just a few lines of coding :)

I don't know how many lines of coding it would require. The issue is not implementation time, it's implementation method. Creating a cascading context menu, as far as I can tell, requires a shell extension DLL. Doing this, again as far as I can tell, requires the use of the commercial version of Visual Studio (it requires MFC components, which are not included in the Express edition). There are three problems with this:

1) I write free, open source software; I'm really not interested in buying a commercial application to do it

2) Because I write free, open source software, I feel that requiring a commercial compiler to modify the code would largely defeat the point of the license

3) I primarily write scripts, not system libraries; doing something like this would be a completely different experience

Now as I've said in the past, if anyone is willing to help out and/or contribute such an extension for UniExtract, I'd be more than happy to include it. That's not very likely, though, so for now it'll remain on my list of long-term goals.

Thanks for clearing my doubts... now I can see your point and agree with you ;)

Hope that someone will code the dll for you :D

Link to comment
Share on other sites

I have some suggestions.

  1. Will 1.5 have a single context menu item with submenu (like winzip and other handy tools)?
    I think the context menu will be more clearly if it is as follow:
    383601813_9c1f276e99_o.png
  2. Use a special Preferences dialog and add the options which is in the Installation so that users can set the options easily.
  3. Add support to .wim file?
    .wim file is Microsoft Windows Imaging Format. It used for Windows Vista Install, Windows PE 2.0 and so on. You can see Wikipedia for more infomation.
    To extract files from .wim file, you must use command tool ImageX. The tool include Windows Automated Installation Kit (AIK). WAIK is free for users, download address: http://www.microsoft.com/downloads/details...;DisplayLang=en
    Please read the WAIK LICENSE and make sure if it can be used in Universal Extractor:
    WAIK_LICENSE.RTF
  4. As we know, Universal Extractor judges file type by the extension. It is not the best way. For example, there is a test.zip archive and Universal Extractor can extract the files correctly. If we rename the "test.zip" into "test.xip", Universal Extractor will not recognize it, But it still is a zip archive.
    Universal Extractor can judge file type by "Identifying Characters". For example, the Identifying Characters of zip archive is "50 4B 03 04" (Hex) or "PK" (ASCII). More Identifying Characters can be searched in filext.com. If Universal Extractor judge file type by Identifying Characters, it will recognize more files.
    If it is difficult to judge file by this way, you can try the command tool called TrID.

    TrID Readme:
    TrID © 2003-06 By Marco Pontello

    Info:

    E-Mail: marcopon@gmail.com

    License:

    The program can be freely distribuited and is freeware for non commercial,

    personal, research and educational use.

    Contact the author for commercial use or commercialization of TrID or

    TrID's definitions and contained informations.

    TrID is a utility designed to identify file types from their binary

    signatures. While there are similar utilities with hard coded rules,

    TriID has no such rules. Instead, it is extensible and can be trained

    to recognize new formats in a fast and automatic way.

    TrID uses a database of definitions which describe recurring patterns

    for supported file types.

    You can help creating new definitions!

    Just run the TrIDScan module against a number of files of a given type.

    The program will do the rest.

    See the website for more info & changes log!

    Required System: Win 9x/ME/NT/2K/XP

    N.B.

    If you like the program, you may consider sending a postcard of your city

    to the author at the following address:

    Marco Pontello

    Via Circonvallazione 137

    30030 Maerne VE

    Italy

    Thanks! :-)


Link to comment
Share on other sites

I think the context menu will be more clearly if it is as follow:

I agree, but I cannot do it for reasons stated previously.

Use a special Preferences dialog and add the options which is in the Installation so that users can set the options easily.

I've considered that, but it won't be included in version 1.5. Perhaps next version.

Add support to .wim file?

I'd certainly like to do this. Version 1.5 is already frozen, so I'll look into it for the next version.

As we know, Universal Extractor judges file type by the extension. It is not the best way. For example, there is a test.zip archive and Universal Extractor can extract the files correctly. If we rename the "test.zip" into "test.xip", Universal Extractor will not recognize it, But it still is a zip archive.

I already did this for 1.5, using TrID, in fact. :) Check the beta changelog from a few posts back for more details.

Link to comment
Share on other sites

Brief update:

The primary delay in releasing 1.5 final has been getting the language files updated. While I've already received most of them, there were still a few that I was missing. Well, I just realized earlier tonight that my spam filter had been falsely identifying the translators' e-mails as spam. ****!

So, I got that issue worked out and e-mailed everyone about the issue and asked them to please resubmit their updates. I've already received two of the four missing files. Hopefully it won't be long before I receive the two final ones. As soon as I do, I'm packaging 1.5 final and releasing it.

I cannot begin to express how ready I am to be done with this version.

Oh, and in case you're interested in reading a bit of information about a couple of the new features in 1.5, you can check out this post on my website: Two very cool applications - cmdTotal and TrID

Edited by nitro322
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...