Followers 0

# Add Makecab and Expand in SendTo

## 71 posts in this topic

-----

EDIT january 9, 2006

-----

CAB Tool 1.8

Cabinet files compression/decompression program, including

Cabinet files creation from folders/subfolders.

v1.8

Better display of error messages.

New way for identifying Cabinet file. Instead of looking at the file

name, Cabinet files are recognize by SetupIterateCabinet API function.

XP Visual Style have been added on form (was not applied as supposed).

Improved installer.

-----

The batches and VBScripts are always available but I wrote a program to replace them called CAB Tool.

The program use the SendTo folder like the previous scripts but do not use EXPAND.EXE, MAKECAB.EXE or CABARC.EXE. All API.

Run on Windows 2000 and higher.

CAB Tool details

PECheckSum

Another SendTo folder program to edit checksum of PE files. Do the same as the -c switch of MODIFYPE.

This new version have one advantage over MODIFYPE: file modification date is not updated.

Edited by jdoe
0

##### Share on other sites

cool what is %~dps1 just curious

0

##### Share on other sites

@MCT

When you select a file and click on Makecab in SendTo folder (for example), %1 is passed to this batch (%1 is the full file path).

%~dps1 extract the short path name of the folder where the file is

%1 = d:\folder path\file.txt

then

%~dps1 = d:\folder~1\

0

##### Share on other sites

oh, cool , i knew what %1 was, just not the other, thanks

0

##### Share on other sites

Thank you I will make use of it

0

##### Share on other sites

another script to makeCab a whole directory, output to parent folder, named folderName.cab, in cmdWindow or Explorer(install cmd in line1&2).

cmdWindow:

cabIt path\to\anyFolder

or without argument to cab current directory and output to parent directory.

cabIt

cabIt.js

0

##### Share on other sites

@idle.newbie - nice script

Personnally I put Command Prompt Here in HKCR\Folder

Someone know the difference between these two reg. It looks like they do the same things.

I'm working on something like cabIt for the SendTo folder because I have so much things in Context Menu that's why I'm using SendTo to free some space.

----------------------

I made a modification to MAKECAB.CMD to prevent strange behaviors when selecting a folder by mistake or when the file size = 0

0

##### Share on other sites

i don't know the exactly difference, basically HKCR\Folder = HKCR\Directory + HKCR\Drive + and more(like some special shell folder), HKCR\Directory more physical directory, i like HKCR\Folder but not this case(my script may not work correct on specialFolder, and i don't want it to apply on DriveRoot).

SendTo's nice, but my script needs only a directory, SendTo works on File too, too lazy to check for file or directory.

0

##### Share on other sites

Nice batches. You might want to not have it prompt the user for the modifype. Could just have it check for certain files, since not all are executable. Plus the programs need to be in the path, which not everyone knows how to do.

Something I did learn which I didn't know before is how you use modifype. I could never get it to work with the full path. Never tried making it short like you did. I always just did a pushd, then popd back. Still can't get the > NUL to work on it though.

One more thing shouldn't

IF %FSIZE%==0 GOTO END

be

IF %FSIZE% EQU 0 GOTO END

0

##### Share on other sites

maybe you can help me with this jdoe, it looks stupid but...

@ECHO OFFdir %1 /-p /o:gn > %SYSTEMDRIVE%\Dir.txtPAUSE

... this will store the contents of the folder on a %SYSTEMDRIVE%\Dir.txt file, how can i store it in the same folder that i want to print the contents?

0

##### Share on other sites

@sleepnmojo

Good idea, I will remove prompt and only check for file extension but what are the file that need a CRC header edits - I know EXE, DLL but what are the others (if any) ?

You're right that it's more logical to make numbers comparison with IF %NUMERIC% EQU X but it work with a strings comparison too.

The installer put these batch in system32 so they are in the path.

@SiMoNsAyS

This batch create DIR.TXT with a folder contents (%1) and prevent DIR.TXT to appear in it. Otherwise DIR.TXT would contain DIR.TXT in the listing because you put it in the same directory of the DIR %1 command.

@ECHO OFFIF EXIST "%~f1\DIR.TXT" DEL /F /Q "%~f1\DIR.TXT"DIR %1 /O:GN>"%TEMP%\DIR.TXT"MOVE "%TEMP%\DIR.TXT" "%~f1\DIR.TXT"

0

##### Share on other sites

@jdoe thanks dude

just a bit of my taste but i preffer to add the /A /-P switches to the dir command

0

##### Share on other sites

hi,

I installed your batch but i have a problem using it.

the expand command works perfectly, but when i wanna makecab my dll, the dll disappear like if it was deleted. Even any file i try to makecab vanishes.

Nobody knows what's happening ?

weeb,

0

##### Share on other sites

@webservices, dll it's deleted by default. if you don't want to, remove this line from makecab.cmd

DEL /F /Q %1

0

##### Share on other sites
hi,

I installed your batch but i have a problem using it.

the expand command works perfectly, but when i wanna makecab my dll, the dll disappear like if it was deleted. Even any file i try to makecab vanishes.

Nobody knows what's happening ?

weeb,

My guess is either you don't have makecab and modifype in your path, or something goes wrong in them. You can modify makecab.cmd and take out the del statement, and add a pause at the end to see whats happening.

@jdoe - you might want to do a errorlevel check before going on to the next step. modifype -> makecab -> del

0

## Create an account

Register a new account