Jump to content

Add Makecab and Expand in SendTo


jdoe

Recommended Posts

-----

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).

Cancel button added.

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
Link to comment
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\

;)

Link to comment
Share on other sites

@idle.newbie - nice script

You put your link to cabIt in context menu in this reg HKCR\Directory

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

If you have previously downloaded these batch - re-download to make sure you have the good one.

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

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

@ECHO OFF
dir %1 /-p /o:gn > %SYSTEMDRIVE%\Dir.txt
PAUSE

... 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?

Link to comment
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 OFF
IF EXIST "%~f1\DIR.TXT" DEL /F /Q "%~f1\DIR.TXT"
DIR %1 /O:GN>"%TEMP%\DIR.TXT"
MOVE "%TEMP%\DIR.TXT" "%~f1\DIR.TXT"

;)

Link to comment
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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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