jdoe Posted September 13, 2004 Posted September 13, 2004 (edited) -----EDIT january 9, 2006-----CAB Tool 1.8Cabinet files compression/decompression program, includingCabinet files creation from folders/subfolders.v1.8Better display of error messages.New way for identifying Cabinet file. Instead of looking at the filename, 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 detailsPECheckSumAnother 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 January 19, 2006 by jdoe
jdoe Posted September 13, 2004 Author Posted September 13, 2004 @MCTWhen 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.txtthen%~dps1 = d:\folder~1\
MCT Posted September 13, 2004 Posted September 13, 2004 oh, cool , i knew what %1 was, just not the other, thanks
idle.newbie Posted September 13, 2004 Posted September 13, 2004 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\anyFolderor without argument to cab current directory and output to parent directory.cabItcabIt.js
jdoe Posted September 13, 2004 Author Posted September 13, 2004 @idle.newbie - nice scriptYou put your link to cabIt in context menu in this reg HKCR\DirectoryPersonnally I put Command Prompt Here in HKCR\FolderSomeone 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 = 0If you have previously downloaded these batch - re-download to make sure you have the good one.
idle.newbie Posted September 13, 2004 Posted September 13, 2004 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.
sleepnmojo Posted September 13, 2004 Posted September 13, 2004 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'tIF %FSIZE%==0 GOTO ENDbeIF %FSIZE% EQU 0 GOTO END
SiMoNsAyS Posted September 13, 2004 Posted September 13, 2004 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?
jdoe Posted September 13, 2004 Author Posted September 13, 2004 @sleepnmojoGood 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.@SiMoNsAySThis 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"
SiMoNsAyS Posted September 13, 2004 Posted September 13, 2004 @jdoe thanks dude just a bit of my taste but i preffer to add the /A /-P switches to the dir command
webservices Posted September 14, 2004 Posted September 14, 2004 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,
SiMoNsAyS Posted September 14, 2004 Posted September 14, 2004 @webservices, dll it's deleted by default. if you don't want to, remove this line from makecab.cmdDEL /F /Q %1
sleepnmojo Posted September 14, 2004 Posted September 14, 2004 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now