Jump to content


Need Help creating a script for XP SP2 Autopatcher


9 replies to this topic

#1 itsonlyme3

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 13 November 2008 - 05:29 PM

Hi,

At my work, we just updated our XP SP2 workstations using a script as shown below and I want to do the exact same thing as shown below on my XP XP2 home PC as well.
Can you all please show me on how to do this?
I had downloaded all the "KB" patches already and also have the Autpatcher for XP SP2 from a while back ago.

Please help.

Heres what it did when we executed the Autopatcher.exe at work and this batch file window (Command Prompt window) came up, and it went through all the "MS" patches then rebooted after 2 minutes....How can I do this??

===================================================================
D:\Documents and Settings\myusername\Desktop>\\servername\name_pub\FOLDER\MS08_058.EXE
/s

===================================================================

Edited by itsonlyme3, 13 November 2008 - 05:37 PM.


#2 Cristiano

    Super Helpful Guy

  • Veterans
  • PipPipPipPipPipPip
  • 3,851 posts
  • Gender:Male
  • Location:Brazil (Santa Maria - RS)

Posted 13 November 2008 - 05:49 PM

at apup folder, you can found an tool named "reboot.exe". just put that file at the end of your list and will do the trick. also, you can create your list also you are doing right now and, for the last update on the list, you may add an "/forcereboot" instead the /noreboot.

also, you need to be aware than updates must to be installed in proper order. if an update is in the wrong order, it may not work also expected. also, i don't believe that MS08_058.EXE for the name of an update is a good thing. in each ms bulletin you may have several updates and, in the event of some update become obsolete, can be a tricky pinpoint it.

also, you may have an issue with this:
MS08_058.EXE /s

with this command line, you only will have an silent install, nothing else. if the update require an reboot, just after apply the update, your machine will be rebooted. if you add /quiet /norestart /overwriteoem then all the updates in your list will be applied before an reboot.

also, you can run autopatcher with arguments, that you will have the proper order to install and also you will have an tool to detect if the update is already applied or not. by eg, you may run autopatcher.exe with: /nolicence /recommended /neverselectinstalled that will make all the critical and non critical to be selected. there's other command lines that can help you too

[]s

#3 itsonlyme3

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 13 November 2008 - 07:11 PM

Ok, as this is important to me, I need you to post an example of how this script will look like in Notepad before I save it as a BAT file.
Please, I will learn alot better using examples than rather a simple long explanation like above.

Ok, I have now created a folder named MSUPDATES, and I put all the "MS.EXE" patches in them in order starting from MS-041 to MS-068....onto my Desktop.
And as I mentioned, I already have the components of AP for XP SP2...

How can I create this using Notepad and then saving it as a batch script file like the one I pointed out?

And where would this script be put after I insert the script into the Notepad?

I need like 1 through 10 steps and etc....instructions on how to create this please.

Thanks in advance.

Edited by itsonlyme3, 13 November 2008 - 07:15 PM.


#4 Cristiano

    Super Helpful Guy

  • Veterans
  • PipPipPipPipPipPip
  • 3,851 posts
  • Gender:Male
  • Location:Brazil (Santa Maria - RS)

Posted 13 November 2008 - 08:59 PM

> this script will look like in Notepad before I save it as a BAT file.
well, what can i say... it should be something like this:
D:\Documents and Settings\myusername\Desktop>\\servername\name_pub\FOLDER\MS08_058.EXE
/s

but you will have put them in the exact order of release. sometimes, the bulletin doesn't matter. also i already said, someday you may be a little lost if you set the names of each kb like ms something. try keep the original name

again, the .bat idea isn't good. you will make the update be applied so many times that you will forget about it. you need do an detection, to avoid re-install of something. with an .bat, you will not have it

> And where would this script be put after I insert the script into the Notepad?
do you have any logon script? but also i said, an .bat file doesn't look for already installed stuff. if you put it into logon script, you will run the script each time that the machine turns on. if you need go the each machine run something (that is the only one thing that you can do to prevent the issue with logon script), you can run autopatcher from a shared folder instead, even if you need create a few modules

[]s

#5 itsonlyme3

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 14 November 2008 - 05:28 PM

Ok, I have a folder called PCLM and I have put all the MS executable in there and named it as Autopatcher.bat.
Is this OK?

E:\PCLM\MS08_001.EXE /s
E:\PCLM\MS08_002.EXE /s
E:\PCLM\MS08_003.EXE /s
E:\PCLM\MS08_004.EXE /s
E:\PCLM\MS08_005.EXE /s
E:\PCLM\MS08_006.EXE /s
E:\PCLM\MS08_007.EXE /s
E:\PCLM\MS08_008.EXE /s
E:\PCLM\MS08_009.EXE /s
E:\PCLM\MS08_010.EXE /s
E:\PCLM\MS08_011.EXE /s
E:\PCLM\MS08_012.EXE /s
E:\PCLM\MS08_013.EXE /s
E:\PCLM\MS08_014.EXE /s
E:\PCLM\MS08_015.EXE /s
E:\PCLM\MS08_016.EXE /s
E:\PCLM\MS08_017.EXE /s
E:\PCLM\MS08_018.EXE /s
E:\PCLM\MS08_019.EXE /s
E:\PCLM\MS08_020.EXE /s
E:\PCLM\MS08_021.EXE /s
E:\PCLM\MS08_022.EXE /s
E:\PCLM\MS08_023.EXE /s
E:\PCLM\MS08_024.EXE /s
E:\PCLM\MS08_025.EXE /s
E:\PCLM\MS08_026.EXE /s
E:\PCLM\MS08_027.EXE /s
E:\PCLM\MS08_028.EXE /s
E:\PCLM\MS08_030.EXE /s
E:\PCLM\MS08_031.EXE /s
E:\PCLM\MS08_032.EXE /s
E:\PCLM\MS08_033.EXE /s
E:\PCLM\MS08_034.EXE /s
E:\PCLM\MS08_035.EXE /s
E:\PCLM\MS08_036.EXE /s
E:\PCLM\MS08_037.EXE /s
E:\PCLM\MS08_038.EXE /s
E:\PCLM\MS08_041.EXE /s

#6 Cristiano

    Super Helpful Guy

  • Veterans
  • PipPipPipPipPipPip
  • 3,851 posts
  • Gender:Male
  • Location:Brazil (Santa Maria - RS)

Posted 14 November 2008 - 10:04 PM

> Is this OK?
no, it is not. do you remember when i said about reboot? if any of those modules require an reboot, the machine will be rebooted at once, doesn't matter if all the updates are already in place or not. to know the proper command line, you will need run those files with an /? argument and take not. but you will notice that sometimes they change things...

[]s

#7 itsonlyme3

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 16 November 2008 - 03:18 PM

Ok, if you have the time, can you just please post an example of what should my script look like?
And at my work, the Atuopatcher was not a batch file with the .BAT extenstion, it was Autopatcher.EXE.

And when we clicked on that program, it gave a command window as below. So can you post an example?


D:\Documents and Settings\myusername\Desktop>\\servername\name_pub\FOLDER\MS08_058.EXE
/s

#8 Cristiano

    Super Helpful Guy

  • Veterans
  • PipPipPipPipPipPip
  • 3,851 posts
  • Gender:Male
  • Location:Brazil (Santa Maria - RS)

Posted 16 November 2008 - 06:18 PM

yes. like i said, you need first run the update with an /? to take the proper install commands, like this:
Posted ImagePosted Image
http://img385.images...command2eu7.gif

of course, this kb is in my own language, but you may get the idea. so, to do an silent install for WindowsXP-KB938464-x86-PTB.exe, you should have and command line like this:
WindowsXP-KB938464-x86-PTB.exe /quiet /norestart /overwriteoem

the problem: you need run each update with an /? argument to be sure that each one works with /quiet /norestart /overwriteoem or at least, trust in your own luck, because sometimes they change the command line. of course, you could take the proper command line from an older version of autopatcher xp sp2, but seems that you have renamed each update for MS08_025.EXE, that will give you an headache to match each one with our modules.

also i already said, with an .bat file, it's impossible to you set an condition to the update be installed. so, if by any reason any of those updates that you are trying to install is already installed in any machine, it will be installed again, because with an .bat file, the you can't set an condition. also, you will need run this .bat file manually in every machine from your network, because if you set it in a logon script, it will be run every single time that the machine turns on, unless you manage a way to set this .bat file to run only one time. also, you may have another issue: if, by any reason, any of the machines that you intent to run this .bat file is running in low rights mode, your efforts will be in vain.

because those issues that i've told to you 2-3 times already, i believe that an .bat file to install the updates is almost a waste of time. you even can run windows update in local mode through an network (ms has the documentation for that), that will do the job nicely too.

[]s

#9 itsonlyme3

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 18 November 2008 - 05:41 AM

Maybe I just will not put those files as a MS.exe ones.
I also downloaded alot of files with the KB ones too.

Thanks for the pictures.

But can you post the script were I have to out it in Notepad? Or....are you saying that the APUP file comes with its own script generator so I will not have to create one in Notepad?

#10 Cristiano

    Super Helpful Guy

  • Veterans
  • PipPipPipPipPipPip
  • 3,851 posts
  • Gender:Male
  • Location:Brazil (Santa Maria - RS)

Posted 18 November 2008 - 10:27 AM

the script for autopatcher is only needed if you intent that apup download the kbs. so far, there's not an script generator and we need do that with notepad. i also do the modules with notepad, but there's an module editor at tools folder. also, if you intent build your own modules, you will need be sure about the detections, module uin, etc. but basically, if you take a careful look at the module and do the proper modifications for each kb, it will work

[]s





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users