George King Posted September 6, 2009 Posted September 6, 2009 Does anybody know, how i can extract all hotifixes into folder? I want extract KBXXXXX to KBXXXXX ect...For %%A In (*.exe) DO %%A /q /x:"")I read about this %PATH:~0,-4%But dont know ho to add this line into my script... Quote
Guest Posted September 6, 2009 Posted September 6, 2009 (edited) Does anybody know, how i can extract all hotifixes into folder? I want extract KBXXXXX to KBXXXXX ect...For %%A In (*.exe) DO %%A /q /x:"")I read about this %PATH:~0,-4%But dont know ho to add this line into my script...well you don't need the %PATH:~0,-4%it's for getting a part of the path you will just need to add to the forFor %%A In (*.exe) DO %%A /q /x:"c:\Temp")i hope that helped Edited September 6, 2009 by DaRk MaDnEsS Quote
George King Posted September 6, 2009 Author Posted September 6, 2009 (edited) well you don't need the %PATH:~0,-4%it's for getting a part of the path you will just need to add to the forFor %%A In (*.exe) DO %%A /q /x:"c:\Temp")i hope that helpedBut i have about 180 hotfixes and want have KB111111 in folder KB111111, KB222222 in KB222222..This will extract all hotfixes into one folder... Edited September 6, 2009 by George King Quote
Guest Posted September 6, 2009 Posted September 6, 2009 (edited) But i have about 180 hotfixes and want have KB111111 in folder KB111111, KB222222 in KB222222..This will extract all hotfixes into one folder...oh i didn't see that For %%A In (*.exe) DO %%A /q /x:"%%A")then something like that might do the trick ?Edit: After Thinking that would make a messso you better try this one my mistake %FileName:~0,7% << this mean we would take the first 7 words of the name that up to the file name but i think they all share the same length and i don't know if 7 is right you test and tell meFor %%A In (*.exe) DO (Set FileName=%%A FileName=%FileName:~0,7%md %FileName%/q /x:"%FileName%") Edited September 6, 2009 by DaRk MaDnEsS Quote
George King Posted September 6, 2009 Author Posted September 6, 2009 I ve test your script and thus all not work...For %%A In (*.exe) DO (Set FileName=%%A %%A /q /x:"%FileName:~0,4%") Quote
Guest Posted September 6, 2009 Posted September 6, 2009 (edited) ok that started to piss me of :ranting: so lets do this For %%A In (*.exe) DO ( Set FileName=%%~nAcall :MDExtract):MDExtractmd %FileName%/q /x:"%FileName% goto :eofthat should work Edited September 6, 2009 by DaRk MaDnEsS Quote
George King Posted September 6, 2009 Author Posted September 6, 2009 Thanks, thi works great :thumbsup_anim:For %%A In (*.exe) DO ( Set FileName=%%~nAcall :MDExtract):MDExtract%Filename%.exe /q /x:"%FileName% goto :eof Quote
OnePiece Posted September 6, 2009 Posted September 6, 2009 (edited) I use thisFOR %%f IN (*.exe) DO ("%%f" -x:"%%~nf" /Q)Ciao. Edited September 6, 2009 by OnePiece Quote
ricktendo Posted September 6, 2009 Posted September 6, 2009 Try using dir /b to get the names of the hotfixesHere is a script I use to get the names of the sub folders of my drivers when integrating them with dismfor /f %i in ('dir /b "c:\Drivers\"') do dism /image:c:\mount\ /add-driver /driver:"c:\Drivers\%i" /recurse Quote
5eraph Posted November 22, 2009 Posted November 22, 2009 If you're still looking for a robust extraction script then you may want to try the following code. This is a modified version of one of the scripts I rewrote last month when starting work on my update packs again. (The original code also creates an unattended installation script. Let me know if you want a copy.) Everything you should need to know is in the comment header. Be sure to check the CONSTANT DECLARATIONS section for constants you may need to change, such as update package localization.:: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.