Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Sign in to follow this  
jdoe

Add Makecab and Expand in SendTo

Recommended Posts

jdoe    0

-----

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

Share this post


Link to post
Share on other sites

jdoe    0

@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\

;)

Share this post


Link to post
Share on other sites
idle.newbie    0

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

Share this post


Link to post
Share on other sites
jdoe    0

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

Share this post


Link to post
Share on other sites
idle.newbie    0

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.

Share this post


Link to post
Share on other sites
sleepnmojo    0

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

Share this post


Link to post
Share on other sites
SiMoNsAyS    0

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?

Share this post


Link to post
Share on other sites
jdoe    0

@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"

;)

Share this post


Link to post
Share on other sites
webservices    0

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,

Share this post


Link to post
Share on other sites
sleepnmojo    0
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

Share this post


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

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×