webservices Posted September 14, 2004 Share Posted September 14, 2004 I guess maybe it is cause i put ModifyPE.exe in system32 as i downloaded the file, but i see that in the vbs the file called is modifytypeFOR %%I IN (.EXE .DLL .SYS .OCX .CPL .COM) DO IF /I "%%I"=="%EXT%" MODIFYPE.EXE %~fs1 -cI guess if i rename it to MODIFYPE.EXE it shoudl works. I will give it a try ....Weeb,Nope i tryed, still doesn't work. ummmm, maybe a path problem, but expand should not work as well, or it does. Link to comment Share on other sites More sharing options...
jdoe Posted September 14, 2004 Author Share Posted September 14, 2004 @webservicesI made modification to batches. Now you will have a message if an error occurred. It's gonna be easier for me to know whats the problem.Dont' forget that the original file is deleted, if you send a file to Makecab the file is deleted and a new compressed one is created.If you want to keep the original file like SyMoNsAyS said, delete line DEL /F /Q %1@sleepnmojoModifyPE don't return an error code but if you look at the batch, I found a workaround. Link to comment Share on other sites More sharing options...
webservices Posted September 15, 2004 Share Posted September 15, 2004 @jdoeThx for your fast updates, respect .... Thanks to your logs, i do suspect a corrupt profile. I have a fresh install in a VMware, i am gonna test it in here and give you a feedback.here are the logs i got : The good part is that my files are not deleted anymore Concerning teh expand focntion, i have no probleme. 1) makecab WINNT32U.DLLMicrosoft ® Cabinet Maker - Version 5.1.2600.0Copyright © Microsoft Corporation. All rights reserved..EnsureDirectory: Cant create file: C:\DOCUME~1\chirs\BUREAU\COMPBA~1\ADDMAK~1\NOUVEA~1\WINNT32U.DLL\CAB03540.TMP, errno=2, _doserrno=3, GLE=3ERROR: Path is invalid: C:\DOCUME~1\chirs\BUREAU\COMPBA~1\ADDMAK~1\NOUVEA~1\WINNT32U.DLLAppuyez sur une touche pour continuer...2) makecab winspool.exeERROR - MODIFYPE CAN'T PATCH winspool.exeAppuyez sur une touche pour continuer...EDIT : Ok i did a new try in a clean installation of XP, and i got the same error.It's like a path problem, so maybe the fact my OS is french with accentuated letters, that put a mess in it.I am waiting for your investigations .... Link to comment Share on other sites More sharing options...
jdoe Posted September 15, 2004 Author Share Posted September 15, 2004 @webservicesMan you're not lucky, in fact there is 1 bug I can solve and 1 I can't.1) WINSPOOL.EXE is not a Win32 executable file so it don't need a CRC header edits and by the way what kind of hacking are you doing on this file. You should not need to play with this file or there is something I don't know about this file. If you give me a good reason, I will try to do something for that.2) For WINNT32U.DLL (and all Win32 executable file) the problem is a behavior of MAKECAB.EXE and it's not a path problem. It seem to be a french Windows problem (j'ai la même erreur que toi mais j'ignore si c'est le SP1 ou Windows francais). I have few ideas for solving this problem. I'm working on it... Link to comment Share on other sites More sharing options...
webservices Posted September 15, 2004 Share Posted September 15, 2004 i am sure you gonna make it .... I can still use a cmd btach to launch some makecab command when i need it. but your vbs is quiet cool and easy to use.For the WINSPOOL.EXE, my fault, i just took an .exe without looking at if it was win32 executable or not. Sorry to have confused you. Who would like to hack that file ?A french ? oh god, we are mad but not at this point yest Catch you later on.Weeb. Link to comment Share on other sites More sharing options...
jdoe Posted September 15, 2004 Author Share Posted September 15, 2004 @webservicesBoth problems are solved. The script will know what kind of file it is and will not display an error when there is none. I know there is no utility to decompress winspool.exe but anyway now you can decompress and recompress any file.I made test with english and french Windows and it worked well. Let me know if you still have errors but I think this time it will be ok. Link to comment Share on other sites More sharing options...
webservices Posted September 19, 2004 Share Posted September 19, 2004 @jdoe.sorry not to have responded to you earlier, but i have been away for a few days.First of all, thx ever so much cause now it is working perfectly on my french OS, and be sure I am using your scipts for my custom XP cd.Best wishes on your next developments .....Weeb, Link to comment Share on other sites More sharing options...
RyanVM Posted September 19, 2004 Share Posted September 19, 2004 Is there a way to have the cmd file automatically make the file name uppercase when running makecab? Link to comment Share on other sites More sharing options...
jdoe Posted September 20, 2004 Author Share Posted September 20, 2004 @webservicesGreat @RyanVMI have tried to do so but there is a bug with the french character "é" - "É" and I need these batch to work with both french and english Windows.It's surely possible with an external .EXE program (a kind of renamer.exe) but I want a simple batch for that.With no bugs with french characters I would do something like this to convert file name to uppercase... SET UCN=%1SET UCN=%UCN:a=A%SET UCN=%UCN:b=B%SET UCN=%UCN:c=C%SET UCN=%UCN:d=D%SET UCN=%UCN:e=E%SET UCN=%UCN:f=F%SET UCN=%UCN:g=G%SET UCN=%UCN:h=H%SET UCN=%UCN:i=I%SET UCN=%UCN:j=J%SET UCN=%UCN:k=K%SET UCN=%UCN:l=L%SET UCN=%UCN:m=M%SET UCN=%UCN:n=N%SET UCN=%UCN:o=O%SET UCN=%UCN:p=P%SET UCN=%UCN:q=Q%SET UCN=%UCN:r=R%SET UCN=%UCN:s=S%SET UCN=%UCN:t=T%SET UCN=%UCN:u=U%SET UCN=%UCN:v=V%SET UCN=%UCN:w=W%SET UCN=%UCN:x=X%SET UCN=%UCN:y=Y%SET UCN=%UCN:z=Z%SET UCN=%UCN:é=É%SET UCN=%UCN:à=À%......BTW this is working for the english Windows - if you want a makecab.cmd with this code in it let me know and I will post a makecab.cmd for english Windows only - for uppercase file name (compressed) Link to comment Share on other sites More sharing options...
RyanVM Posted September 20, 2004 Share Posted September 20, 2004 I'm in the US, so an English-only version doesn't bother me Link to comment Share on other sites More sharing options...
QKnet Posted September 27, 2004 Share Posted September 27, 2004 I lile makecab.cmd very much , but I have 2 questions:1) How can I put the command under context menu rather than under SendTo?2) It seems that the makecab.cmd can cab only one folder at a time. How can I do it for several folders (surely in the same root) Link to comment Share on other sites More sharing options...
jdoe Posted September 28, 2004 Author Share Posted September 28, 2004 @QKnet1) You need to add entries in registry to put this command directly in context menu but these scripts are made to be in SendTo folder.2) What you're asking is part of a complete application. Only one selection can be made with these scripts so you can copy want in your cab (files and folders) in one folder and make a cab with this folder.@RyanVMIf your Antivirus software is cool with vbscripts, I added vbscripts in the download package to do the same things as the batches and it puts compressed file name in uppercase characters. Link to comment Share on other sites More sharing options...
RyanVM Posted September 28, 2004 Share Posted September 28, 2004 thanks, but you describe how to do it in batch files? I have some batch files I use for other purposes where having it uppercase everything automatically would be very useful. Link to comment Share on other sites More sharing options...
jdoe Posted September 28, 2004 Author Share Posted September 28, 2004 @RyanVMSET CONVERT_THIS="This is a test"SET UCN=%CONVERT_THIS%SET UCN=%UCN:a=A%SET UCN=%UCN:b=B%SET UCN=%UCN:c=C%SET UCN=%UCN:d=D%SET UCN=%UCN:e=E%SET UCN=%UCN:f=F%SET UCN=%UCN:g=G%SET UCN=%UCN:h=H%SET UCN=%UCN:i=I%SET UCN=%UCN:j=J%SET UCN=%UCN:k=K%SET UCN=%UCN:l=L%SET UCN=%UCN:m=M%SET UCN=%UCN:n=N%SET UCN=%UCN:o=O%SET UCN=%UCN:p=P%SET UCN=%UCN:q=Q%SET UCN=%UCN:r=R%SET UCN=%UCN:s=S%SET UCN=%UCN:t=T%SET UCN=%UCN:u=U%SET UCN=%UCN:v=V%SET UCN=%UCN:w=W%SET UCN=%UCN:x=X%SET UCN=%UCN:y=Y%SET UCN=%UCN:z=Z%ECHO %UCN%The ECHO command will display..."THIS IS A TEST"-----------------------------------------This is how MAKECAB.CMD would look with uppercase conversion@ECHO OFFECHO.SET UCN=%~f1SET UCN=%UCN:a=A%SET UCN=%UCN:b=B%SET UCN=%UCN:c=C%SET UCN=%UCN:d=D%SET UCN=%UCN:e=E%SET UCN=%UCN:f=F%SET UCN=%UCN:g=G%SET UCN=%UCN:h=H%SET UCN=%UCN:i=I%SET UCN=%UCN:j=J%SET UCN=%UCN:k=K%SET UCN=%UCN:l=L%SET UCN=%UCN:m=M%SET UCN=%UCN:n=N%SET UCN=%UCN:o=O%SET UCN=%UCN:p=P%SET UCN=%UCN:q=Q%SET UCN=%UCN:r=R%SET UCN=%UCN:s=S%SET UCN=%UCN:t=T%SET UCN=%UCN:u=U%SET UCN=%UCN:v=V%SET UCN=%UCN:w=W%SET UCN=%UCN:x=X%SET UCN=%UCN:y=Y%SET UCN=%UCN:z=Z%IF NOT EXIST "%~1" GOTO ENDSET EXT=%~x1SET LCEXT=%EXT:~-1%IF /I "%EXT%"==".CAB" GOTO ENDIF "%LCEXT%"=="_" GOTO ENDIF EXIST "%~1\" GOTO COMPRESSCABIF EXIST "%TEMP%\modifype.tmp" DEL /F /Q "%TEMP%\modifype.tmp"FOR /F "tokens=*" %%R IN ('MODIFYPE.EXE %~fs1 -c') DO SET MPEMSG=%%RIF /I "%MPEMSG%"=="NO ERROR OCCURRED, HAVE A NICE DAY" GOTO COMPRESSFILEIF /I "%MPEMSG%"=="FILE IS NOT A PE FILE" GOTO COMPRESSFILEIF EXIST "%TEMP%\modifype.tmp" MOVE /Y "%TEMP%\modifype.tmp" %1>NULECHO ERROR - MODIFYPE CAN'T PATCH "%~nx1"PAUSEGOTO END:COMPRESSFILECD /D "%~dp1"MAKECAB.EXE /D COMPRESSIONTYPE=LZX /D COMPRESSIONMEMORY=21 "%UCN%"IF NOT %ERRORLEVEL% EQU 0 (PAUSE) ELSE (DEL /F /Q %1)GOTO END:COMPRESSCABCD /D %1CABARC.EXE -m LZX:21 -p -r N "%UCN%.CAB" *.*IF NOT %ERRORLEVEL% EQU 0 PAUSE:ENDI hope this will help you for your other batch files Link to comment Share on other sites More sharing options...
RyanVM Posted September 28, 2004 Share Posted September 28, 2004 great, thank you very much! Link to comment Share on other sites More sharing options...
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