MSFN Forum: Quickly makecab and expand files - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Quickly makecab and expand files Add context menu entries Rate Topic: -----

#1 User is offline   fdv 

  • MSFN Expert
  • Group: Developers
  • Posts: 1,099
  • Joined: 16-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 April 2008 - 07:26 PM

I know double posting is kind of lame, but this is so short I hope no one minds.

Although this won't makecab everything in a folder, it will add Compress as a context menu option to dll and exe files, and expand as an option to compressed exe, dll, inf, and sys. You can select as many DLL and EXE files as you want and left click and you will see "Compress" as an option. Select it, and every one of your selected files will be compressed.

 
[Version]
signature="$Windows NT$"

[DefaultInstall]
AddReg = addreg

[addreg]
HKCR,"exefile\Shell\Compress\command",,,"%11%\makecab.exe ""%1"""
HKCR,"dllfile\Shell\Compress\command",,,"%11%\makecab.exe ""%1"""
HKCR,".dl_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""
HKCR,".in_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""
HKCR,".ex_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""
HKCR,".sy_\Shell\expand\command",,,"%11%\expand.exe -r ""%1"""
 



#2 User is offline   war59312 

  • Will's Blog
  • PipPipPipPipPip
  • Group: Members
  • Posts: 922
  • Joined: 07-June 02

Posted 17 April 2008 - 09:45 PM

Thanks, perfect!

For newbies simply save as a .inf file using notepad and then right click this file and choose install.

And make sure you have both makecab.exe and expand.exe installed to %windir%\system32\

#3 User is offline   punk 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 15-May 04

Posted 29 April 2008 - 09:53 PM

View Postfdv, on Apr 8 2008, 08:26 PM, said:

.....

this is my way


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\expand_Cab_file]

[HKEY_CLASSES_ROOT\*\shell\expand_Cab_file\command]
@="expand -r \"%1\" \"\\\""


[HKEY_CLASSES_ROOT\*\shell\CAB_Max]

[HKEY_CLASSES_ROOT\*\shell\CAB_max\command]
@="makecab /v3 /D CompressionType=LZX /D CompressionMemory=21 \"%1\""


all files can be Compressed

and then all cab files can be expanded

THX

#4 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 May 2008 - 04:12 PM

Here's my way:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\Expand]
@="Expand"
"extended"=""
[HKEY_CLASSES_ROOT\*\shell\Expand\command]
@="expand -r \"%1\" %cd%"
[HKEY_CLASSES_ROOT\*\shell\Makecab]
@="Makecab"
"extended"=""
[HKEY_CLASSES_ROOT\*\shell\Makecab\command]
@="makecab \"%1\""


It's essentially the same except I add the "extended"="" so that I would have to press Shift and then right-click in order to see these commands. Otherwise they are hidden. Thus, it eliminates the messy right-click menu.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy