Results 1 to 24 of 24

Thread: RAR5 in DOS?

  1. #1
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Extract RAR5 archive in real DOS (not DOS window)?

    Hello all,

    Anyone can tell me how to extract RAR5 normal and solid archive in DOS? Only normal files with ANSI names, no Unicode or junctions or other special NTFS things needed. It is possible somehow? Anyone has done the coding?

    Thanks!
    Last edited by Simon; 21st July 2014 at 22:08.

  2. #2
    Member
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    342
    Thanks
    12
    Thanked 34 Times in 28 Posts
    using ancient rar do the job

  3. #3
    Member
    Join Date
    Aug 2008
    Location
    Planet Earth
    Posts
    772
    Thanks
    63
    Thanked 270 Times in 190 Posts
    You can try this one (not for new RAR5 format):

    Command line freeware DOS32 UnRAR
    http://www.rarlab.com/rar/unrar38b.zip

  4. #4
    Member
    Join Date
    May 2009
    Location
    France
    Posts
    95
    Thanks
    13
    Thanked 72 Times in 42 Posts
    Hello,

    Have you tried UnRAR for Windows with HX DOS Extender?

    AiZ

  5. #5
    Member
    Join Date
    Oct 2009
    Location
    usa
    Posts
    56
    Thanks
    1
    Thanked 9 Times in 6 Posts
    ?
    Last edited by zyzzle; 15th July 2014 at 23:50.

  6. #6
    Member
    Join Date
    Oct 2009
    Location
    usa
    Posts
    56
    Thanks
    1
    Thanked 9 Times in 6 Posts
    Still nobody has compiled an UNRAR.EXE for DOS which supports RAR5 archives? Is it a difficult thing to do? Or, is it because dictionary size would be limited in DOS due to its 32-bit nature? Still, with DJGPP , I thought available memory for decompression could be set as high as 2 GB?

  7. #7
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question

    Quote Originally Posted by fcorbelli View Post
    using ancient rar do the job
    How? Ancient RAR is supporting RAR5 by magic?

    Quote Originally Posted by Sportman View Post
    You can try this one (not for new RAR5 format)
    Thank you. I know it, but I need for RAR5 which I mention clearly.

    Quote Originally Posted by AiZ View Post
    Have you tried UnRAR for Windows with HX DOS Extender?
    Thank you. With both HX v2.16 stable and v2.17 release candidate I get this error but I don't know how to fix:
    Code:
    DPMI loader version 3.8.0 
    Copyright (C) 1993-2010 Japheth
    
    dpmild32: import not found: CreateHardLinkW
    dpmild32: file KERNEL32.dll
    dpmild32: c:\hx\dkrnl32.dll: cannot resolve imports
    Any ideas?

    Quote Originally Posted by zyzzle View Post
    Still nobody has compiled an UNRAR.EXE for DOS which supports RAR5 archives? Is it a difficult thing to do? Or, is it because dictionary size would be limited in DOS due to its 32-bit nature? Still, with DJGPP , I thought available memory for decompression could be set as high as 2 GB?
    I was thinking also that with some DOS extender memory limit is not a problem?

  8. #8
    Member
    Join Date
    Oct 2009
    Location
    usa
    Posts
    56
    Thanks
    1
    Thanked 9 Times in 6 Posts
    It may also be a Unicode-support problem? If so, somebody could compile unrar v5 for DOS without Unicode support?

  9. #9
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by zyzzle View Post
    It may also be a Unicode-support problem? If so, somebody could compile unrar v5 for DOS without Unicode support?
    Yes, I mention this also. I don't mind no Unicode support. As long as file names can be converted to ANSI while extracting it is ok. File content is important, not name.

  10. #10
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    So there is no solution for this?

  11. #11
    Member
    Join Date
    Oct 2009
    Location
    usa
    Posts
    56
    Thanks
    1
    Thanked 9 Times in 6 Posts
    If there was source code available in a DOS-friendly format for unrar v. 5, I would try compiling in DJGPP. If it is in plain vanilla C, perhaps, but I don't see any such source. Someone could perhaps port UNIX unrar v.5 to DOS, but it's beyond my simple compilation skills. It's a pity that there's no binary compilation for DOS.

  12. #12
    Member
    Join Date
    Sep 2013
    Location
    ?
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Download WinRAR 5 trial
    > UnRAR.exe CLI freeware

  13. #13
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by zyzzle View Post
    If there was source code available in a DOS-friendly format for unrar v. 5, I would try compiling in DJGPP. If it is in plain vanilla C, perhaps, but I don't see any such source. Someone could perhaps port UNIX unrar v.5 to DOS, but it's beyond my simple compilation skills. It's a pity that there's no binary compilation for DOS.
    Maybe some expert coder can study UnRAR source and try to compile for DOS? I don't know what will be the difficulties but hope it is possible somehow.

    Quote Originally Posted by JNZ View Post
    Download WinRAR 5 trial
    > UnRAR.exe CLI freeware
    I think people nowadays have forgotten what is DOS and are thinking DOS window in Windows is real DOS.

  14. #14
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    One difficulty is that RAR5 may require more than 640K of memory.

  15. #15
    Member
    Join Date
    Oct 2009
    Location
    usa
    Posts
    56
    Thanks
    1
    Thanked 9 Times in 6 Posts
    Well, unrar 3.8 exists for DOS (given in the link above). But I believe it uses the buggy, obsolete POSIX OS/2 extender. So, somebody figured out how to get around the 640k limitation, because of course UNRAR v3 supports dictionary sizes of up to 1024 kb.

  16. #16
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    unrar38b for DOS won't extract a RAR archive compressed with -ma5. I tried it.

  17. #17
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Matt Mahoney View Post
    One difficulty is that RAR5 may require more than 640K of memory.
    Isn't that what DOS extenders are for?

    Quote Originally Posted by zyzzle View Post
    Well, unrar 3.8 exists for DOS (given in the link above). But I believe it uses the buggy, obsolete POSIX OS/2 extender. So, somebody figured out how to get around the 640k limitation, because of course UNRAR v3 supports dictionary sizes of up to 1024 kb.
    I thought RAR4 supports only up to 4MB dictionary? So why would UnRAR v3 support bigger dictionary sizes?

    Quote Originally Posted by Matt Mahoney View Post
    unrar38b for DOS won't extract a RAR archive compressed with -ma5. I tried it.
    Yes, that is the problem that UnRAR for DOS does not support RAR5 for now, but I think he was trying to say that it uses some sort of extender so the 640K memory limit should not be a problem if it is updated to handle RAR5 archives.

  18. #18
    Member
    Join Date
    May 2008
    Location
    Estonia
    Posts
    377
    Thanks
    139
    Thanked 198 Times in 108 Posts
    Quote Originally Posted by Simon View Post

    Thank you. With both HX v2.16 stable and v2.17 release candidate I get this error but I don't know how to fix:
    Code:
    DPMI loader version 3.8.0 
    Copyright (C) 1993-2010 Japheth
    
    dpmild32: import not found: CreateHardLinkW
    dpmild32: file KERNEL32.dll
    dpmild32: c:\hx\dkrnl32.dll: cannot resolve imports
    Any ideas?
    If multiple copy of file is not needed in another path then in hardlinks.cpp comment out WIN and UNIX part and force return Success;

    As DOS has no hard/symlink support.
    KZo


  19. #19
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by kaitz View Post
    If multiple copy of file is not needed in another path then in hardlinks.cpp comment out WIN and UNIX part and force return Success;

    As DOS has no hard/symlink support.
    Thank you but sorry I am not a coder. Can you please help with EXE that will do this?

  20. #20
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs down

    Quote Originally Posted by kaitz View Post
    If multiple copy of file is not needed in another path then in hardlinks.cpp comment out WIN and UNIX part and force return Success
    Ok, looks like no-one is willing to help. I downloaded UnRAR 5.1.7 source and also spent long time getting Visual Studio 2013. Opening UnRAR.vcproj immediately gave me lots of errors:

    Code:
    UnRAR.vcproj: VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
    UnRAR.vcproj: All user macros reported below for configuration 'Debug|Win32' are used before their definition, which can cause undesirable build results; this is not supported in this release. You can resolve this by changing the inclusion order of the consuming property sheets and making sure they come after the property sheets defining the user macros.
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (86,5); The property "TargetPlatformIdentifier" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (87,5); The property "TargetPlatformVersion" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    UnRAR.vcproj: All user macros reported below for configuration 'Debug|x64' are used before their definition, which can cause undesirable build results; this is not supported in this release. You can resolve this by changing the inclusion order of the consuming property sheets and making sure they come after the property sheets defining the user macros.
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (86,5); The property "TargetPlatformIdentifier" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (87,5); The property "TargetPlatformVersion" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    UnRAR.vcproj: All user macros reported below for configuration 'Release|Win32' are used before their definition, which can cause undesirable build results; this is not supported in this release. You can resolve this by changing the inclusion order of the consuming property sheets and making sure they come after the property sheets defining the user macros.
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (86,5); The property "TargetPlatformIdentifier" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (87,5); The property "TargetPlatformVersion" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    UnRAR.vcproj: All user macros reported below for configuration 'Release|x64' are used before their definition, which can cause undesirable build results; this is not supported in this release. You can resolve this by changing the inclusion order of the consuming property sheets and making sure they come after the property sheets defining the user macros.
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (86,5); The property "TargetPlatformIdentifier" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    UnRAR.vcproj: MSB4211: C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (87,5); The property "TargetPlatformVersion" is being set to a value for the first time, but it was already consumed at "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props (103,5)".
    Finally running the compiled UnRAR.exe under HX v2.17 RC gave me the following errors:

    Code:
    DPMI loader version 3.8.0
    Copyright (C) 1993-2010 Japheth
    
    dpmild32: import not found: CreateHardLinkW
    dpmild32: import not found: TzSpecificLocalTimeToSystemTime
    dpmild32: import not found: GetModuleHandleExW
    dpmild32: file KERNEL32.dll
    dpmild32: c:\hx\dkrnl32.dll: cannot resolve imports
    For CreateHardLinkW as suggested above I commented some code in ExtractHardlink() in hardlinks.cpp. For TzSpecificLocalTimeToSystemTime I again commented some code in RarTime::SetLocal() in timefn.cpp. For GetModuleHandleExW I simply can't locate the call anywhere in the source!

    As it is I am simply like a bull in a china shop, blindly commenting code here and there with no idea what it does or how it will affect the program. I'm no programmer and this is out of my experience zone completely so I'm giving up. If some expert coder can take some time to help out then that will be great otherwise unfortunately there seems to be no point pursuing this any more.

  21. #21
    Member
    Join Date
    May 2008
    Location
    Estonia
    Posts
    377
    Thanks
    139
    Thanked 198 Times in 108 Posts
    Simon, are you ready?

    Click image for larger version. 

Name:	unrar511dos.jpg 
Views:	319 
Size:	74.9 KB 
ID:	3073

    File unrar 5.11 beta 1
    KZo


  22. The Following 5 Users Say Thank You to kaitz For This Useful Post:

    Bulat Ziganshin (7th August 2014),load (7th August 2014),Mike (8th August 2014),Simon (7th August 2014),surfersat (7th August 2014)

  23. #22
    Member
    Join Date
    Jul 2014
    Location
    3rd Rock From the Sun
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by kaitz View Post
    Simon, are you ready?

    Click image for larger version. 

Name:	unrar511dos.jpg 
Views:	319 
Size:	74.9 KB 
ID:	3073

    File unrar 5.11 beta 1
    Wow kaitz, you are simply awesome! Thanks so much, it works!

    Just had one question though. I created a small solid RAR 5 archive with 1 MB dictionary containing the following 3 text files: "a b.txt", "a.b.txt" and "aᾇb.txt" (deliberately used a Unicode character for the last one). Here are my test and extraction results:





    "a b.txt" was extracted as "ab.txt" (i.e. space was automatically deleted since LFNs are not supported by old DOS, which is absolutely fine), but both "a.b.txt" and "aᾇb.txt" failed extraction with MsgId: 00000003. Is there any way at all that files like these can be extracted too with auto-deletion of offending characters if required?

    Before I sign off though I'd once again like to thank you for all the effort you've spent on this.

  24. #23
    Member
    Join Date
    May 2008
    Location
    HK
    Posts
    160
    Thanks
    4
    Thanked 25 Times in 15 Posts
    Quote Originally Posted by kaitz View Post
    Simon, are you ready?

    Click image for larger version. 

Name:	unrar511dos.jpg 
Views:	319 
Size:	74.9 KB 
ID:	3073

    File unrar 5.11 beta 1
    No source code?

  25. #24
    Member
    Join Date
    May 2008
    Location
    Estonia
    Posts
    377
    Thanks
    139
    Thanked 198 Times in 108 Posts
    KZo


  26. The Following 4 Users Say Thank You to kaitz For This Useful Post:

    Bulat Ziganshin (17th August 2014),roytam1 (17th August 2014),Simon (17th August 2014),surfersat (19th August 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •