Posted September 6, 200915 yr 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...
September 6, 200915 yr 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, 200915 yr by DaRk MaDnEsS
September 6, 200915 yr Author 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, 200915 yr by George King
September 6, 200915 yr 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, 200915 yr by DaRk MaDnEsS
September 6, 200915 yr Author I ve test your script and thus all not work...For %%A In (*.exe) DO (Set FileName=%%A %%A /q /x:"%FileName:~0,4%")
September 6, 200915 yr 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, 200915 yr by DaRk MaDnEsS
September 6, 200915 yr Author Thanks, thi works great :thumbsup_anim:For %%A In (*.exe) DO ( Set FileName=%%~nAcall :MDExtract):MDExtract%Filename%.exe /q /x:"%FileName% goto :eof
September 6, 200915 yr I use thisFOR %%f IN (*.exe) DO ("%%f" -x:"%%~nf" /Q)Ciao. Edited September 6, 200915 yr by OnePiece
September 6, 200915 yr 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
November 22, 200915 yr 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.::
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.