So... You Want To Create CAB files?

It's easier than it sounds. I had to do a lot of looking around before I found that Microsoft distributes a Software Development Kit (SDK). You can find it here.

(If this link expires, please let me know. But you can easily find it by searching the Microsoft website for "Microsoft Cabinet SDK".)

I do not remember all the crap that I went through to find this, but I know it took me a while. Here's the simple solution. Download the SDK mentioned above. It's an auto-extracting zip/exe file. Extract it to the folder of your choosing. After extraction, locate and open the "BIN" folder and find the file "CABARC.EXE". Copy it to a folder where you wish to create your Cabinet files.

After you have copied the file to your "creation folder" next you will need to create a ".bat" file. I don't remember where I got this code either. The only thing that matters is that it works. Copy and paste the following code into notepad, then name it whatever you want. Change the file extension from .txt to .bat and save it in your "creation folder" also.

@echo off
cd "%~dp0"
set _dir=
echo W A R N I N G !
echo CABARC creates damaged cab files if you're entering
echo a nonexistent directory name (i.e: a34 instead of a43).
echo Enter the EXACT directory name or press [ENTER] to exit.
set /p _dir=Directory:
if "%_dir%" == "" goto _ext
cabarc -r -p n "" "%_dir%\*.*"
set _exit=
echo Do you want to exit?
set /p _exit=Enter [Y]es or [N]o:
if /I "%_exit%" == "" goto _ext
if /I "%_exit%" == "n" cls&goto _cab
if /I "%_exit%" == "y" goto _end

Put all the files that you want to be in your .cab file into one folder. We will basically turn your folder into the .cab file. The original folder will remain.

Now all you have to do is run the .bat file. (It MUST be in the SAME FOLDER as "CABARC.EXE".) It will come up in command prompt. I just navigate to the folder I want to evolve into a cabinet file and "copy and paste" the address of the folder into the command prompt window. Then hit the Enter key and you are done. Not even a "Poof! With a puff of smoke.." There's nothing but your new Cabinet File... It's very simple if you follow my instructions. You should be able to create .cab files in less than 2 minutes.

Please remember I am just telling you a fast simple way to create a cabinet file. If you read the documentation with the Microsoft SDK they have many more options than the way I provided for you. Mine was a quick fix to create the file. I wasn't worried about compression, ect. If I need to add more please contact me on the contact page.

Pages Just Added !
Mother Earth!