Jump to content

Script for extracting XP Hotfixes


George King

Recommended Posts

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 for

For %%A In (*.exe) DO %%A /q /x:"c:\Temp")

i hope that helped

Edited by DaRk MaDnEsS
Link to comment
Share on other sites

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 for

For %%A In (*.exe) DO %%A /q /x:"c:\Temp")

i hope that helped

But i have about 180 hotfixes and want have KB111111 in folder KB111111, KB222222 in KB222222..

This will extract all hotfixes into one folder...

Edited by George King
Link to comment
Share on other sites

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 mess

so you better try this one

my mistake :unsure:

%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 me

For %%A In (*.exe) DO (Set FileName=%%A 
FileName=%FileName:~0,7%
md %FileName%
/q /x:"%FileName%")

Edited by DaRk MaDnEsS
Link to comment
Share on other sites

ok that started to piss me of

:ranting:

so lets do this

For %%A In (*.exe) DO ( Set FileName=%%~nA
call :MDExtract
)

:MDExtract
md %FileName%
/q /x:"%FileName%
goto :eof

that should work

Edited by DaRk MaDnEsS
Link to comment
Share on other sites

  • 2 months later...

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.

::
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...