Page 1 of 2 12>
Topic Options
#151512 - 2005-11-15 12:25 PM Automagic Windows patching
MeneM1978 Offline
Lurker

Registered: 2005-11-15
Posts: 2
I find this script: Mcafee update script

Enormously useful in keeping our virus scanners up to date. It's even easier then the whole Enterprise management thingie.

Anyway I'd like to know if there are no kix-scripts around that do the same for automagic Windows patching? I could donwload the individual 2k ande XP patches from SoftwarePatch.com

Put them in a directory, and have the scripts install them from there. This way, the user won't get a nasty surprise if microsoft deems an update so important to automaticly reboot the system. Not saving the users work... (Downside of automatic windows updates).

Thx,
Mark

Top
#151513 - 2005-11-15 12:28 PM Re: Automagic Windows patching
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
WSUS
_________________________
The tart is out there

Top
#151514 - 2005-11-15 12:31 PM Re: Automagic Windows patching
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
If even remotly possible I would go for Windows Server Update Services aka WSUS.

We did and it runs great. It's free and updates Windows 2K and up, Office XP (2002) and up SQL and Exchange 2K and up.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#151515 - 2005-11-15 01:56 PM Re: Automagic Windows patching
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
there are a few UDFs in here, but they are easy to get from the UDF lib

Code:

;************************************ XP HotFix Updates *****************************************
$arrkey = arrEnumKey('HKLM\SOFTWARE\Microsoft\Updates\Windows XP\SP3')
$arrdir = FileList($setup+'\Hotfixes\WinXP','.exe',1)
$MaxSize= 500000
if not @error
$reboot = 0
for each $dir in $arrdir
$installed = 0
$parsed = split($dir,'-')[1]
for each $key in $arrkey
if $key = $parsed $installed = 1 endif
next
if not $installed
if (@ras and GETFILESIZE($dir) < $MaxSize) or not @ras
$=sendmessage(@wksta,"A CRTICAL upgrade is now starting. "+
"Your computer will restart on it's own in about 2-3 minutes. Please do not open any programs. "+
"There is no need to click the OK button.")
? color c+/n ' Installing Security Update '+$parsed
shell '%comspec% /c ' + $dir + ' /passive /norestart'
$reboot = 1
endif
endif
next
if $reboot
ShutDown ('', 'Updates have been applied that require your computer to restart', 5, 1, 1)
quit
endif
endif

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#151516 - 2005-11-15 02:27 PM Re: Automagic Windows patching
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Or have a look here.

http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=149296&an=&page=0&vc=1

Requires WSUS but gives a little more control over the clients.


Edited by Mart (2005-11-15 02:28 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#151517 - 2005-11-15 02:39 PM Re: Automagic Windows patching
MeneM1978 Offline
Lurker

Registered: 2005-11-15
Posts: 2
Well, I sure do apreciate the help from you guys. But WSUS is definitely something I do now want to go for. I have no IIS server in my network, no Database servers and don't need one either.

So installing those things just for WSUS is overkill. I only want to keep these windows machines updated easily. Has microsoft made this updating so incredibly difficult it cant even be scripted then?

Thanks,
Mark

Top
#151518 - 2005-11-15 02:46 PM Re: Automagic Windows patching
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
MS is a little inconsequent when it comes to the place to see if a specific patch has been installed or not. You would end up digging out a large part of the registry.

WSUS is real easy to install just install MSDE as a database and the server it runs on does not have to be the biggest and fastest you got (depending on the number of connected clients).
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#151519 - 2005-11-15 02:55 PM Re: Automagic Windows patching
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

So installing those things just for WSUS is overkill. I only want to keep these windows machines updated easily. Has microsoft made this updating so incredibly difficult it cant even be scripted then?




Manually maintaining your own repository to push out fixes (to the right machines) is a *lot* of hard work.

Installing IIS and MSDE is pretty trivial by comparison - once you've configured a repository and updated your client machines (via GPO) to look at it the only active participation you have to make is to review and approve the updates.

I cannot stress how much easier it will make your life if you go down the WSUS route.

Top
#151520 - 2005-11-15 03:16 PM Re: Automagic Windows patching
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Quote:


....
updated your client machines (via GPO) to look at it
....





And if you don't have GPO and/or AD it can also be done by registry settings.

Configure Automatic Updates in a Non–Active Directory Environment
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#151521 - 2005-11-15 03:28 PM Re: Automagic Windows patching
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
have you just ignored my post? I keep 2000 laptops and desktops updated with that (all XP), but the code is only a little different for 2k

Just dump the patch in the folder and at next logon the user will install it (asuming local admin)
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#151522 - 2005-11-15 03:48 PM Re: Automagic Windows patching
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

(asuming local admin)



BIG assumption

WSUS is easy.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151523 - 2005-11-15 04:25 PM Re: Automagic Windows patching
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Quote:

Well, I sure do apreciate the help from you guys. But WSUS is definitely something I do now want to go for. I have no IIS server in my network, no Database servers and don't need one either.

So installing those things just for WSUS is overkill. I only want to keep these windows machines updated easily. Has microsoft made this updating so incredibly difficult it cant even be scripted then?

Thanks,
Mark



I'm really sorry, but I have to say this - you're the one who's trying to complicate things here m8. Why on gods earth would you even want to try to code your own solutions for updating and managing client PC's and applications when there's better solutions available than you will ever realistically be able to create with scripting, for free?

You'll only end up with a poorly managed environment, with lots of unnecessary work, a higher risk for viruses and instability, seemingly because of faulty presumptions about IIS, databases, and complexity? No hard feelings I hope, but you really, really should do your homework better.


Edited by masken (2005-11-15 04:35 PM)
_________________________
The tart is out there

Top
#151524 - 2005-11-15 04:41 PM Re: Automagic Windows patching
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

have you just ignored my post? I keep 2000 laptops and desktops updated with that (all XP), but the code is only a little different for 2k

Just dump the patch in the folder and at next logon the user will install it (asuming local admin)




No, I didn't ignore your post, however in a mixed OS environment where we want to deliver OS and application patches and updates in a controlled manner WSUS is the weapon of choice.

I assume that you have additional modules for pulling down the updates from MS, delivering them to staging PCs and servers for initial testing and then reporting the success (or failure) of updates as well, but TBH the MS solution is so trivial to implement that if you are just starting to look at implementing a patch roll-out mechanism you'd be hard pressed to find anything that will do a better job at the same price.

Top
#151525 - 2005-11-15 06:24 PM Re: Automagic Windows patching
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Quote:

So installing those things just for WSUS is overkill.




Well then I would have to assume you're running a fairly small shop of computers.

Just turn on Automatic updates and let Microsoft update them over the Internet after hours.

Leave the machines on at night and even if you're only on with a cable modem all your system will complete updates just fine with little to no intervention by you (except to turn it on in the first place and maybe get them the latest version of BITS)
 
Oh!... and that McAfee script is WAY outdated in terms of current coding methods. Lose all the GOTO stuff.
 
 


Edited by NTDOC (2005-11-15 06:26 PM)

Top
#151526 - 2005-11-15 08:10 PM Re: Automagic Windows patching
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Quote:

I find this script: Mcafee update script

Enormously useful in keeping our virus scanners up to date. It's even easier then the whole Enterprise management thingie.

Anyway I'd like to know if there are no kix-scripts around that do the same for automagic Windows patching? I could donwload the individual 2k ande XP patches from SoftwarePatch.com

Put them in a directory, and have the scripts install them from there. This way, the user won't get a nasty surprise if microsoft deems an update so important to automaticly reboot the system. Not saving the users work... (Downside of automatic windows updates).

Thx,
Mark




see my first post to answer your question

of course, to install patches your users have to be local admin
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#151527 - 2005-11-15 08:14 PM Re: Automagic Windows patching
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Quote:


....
except to turn it on in the first place and maybe get them the latest version of BITS
....





Doesn't BITS come automatically with windows update.
WSUS did put it on all our comps automatically so my guess is that windows update does this also.

If not then you can get BITS here.
http://www.microsoft.com/downloads/results.aspx?freetext=bits&productID=&DisplayLang=en
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#151528 - 2005-11-15 08:38 PM Re: Automagic Windows patching
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
@Mart, yes BITS comes with WU. Part of the newer WU client.
_________________________
The tart is out there

Top
#151529 - 2005-11-15 10:39 PM Re: Automagic Windows patching
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Yes part of the "newer" client. However I'm not 100% positive that a system left completely alone to do auto updates installs that piece.

I've been to systems that are up to date but if you run update manually you still have to download some ActiveX stuff from Microsoft. My fault I suppose didn't really pay attention to what it installs - just so used to having to install to continue I don't read it (like a user).

Top
#151530 - 2005-11-16 06:22 AM Re: Automagic Windows patching
sixdoubleo Offline
Starting to like KiXtart

Registered: 2004-02-06
Posts: 118
Loc: California, US
I agree with the notion that going with WSUS is the best route...to a point. I manage a 1200-desktop environment of NT4, 2000, and XP machines. It's like 80% XP, 15% 2000, and 5% NT. I am currently looking at WSUS but it has a few fairly major (in my opinion) limitiations. The one thing that I find to be a real issue for me is the way patches are pushed out. It requires you to schedule a specific time that patches are installed.

What if I want patches installed at startup, before the user even logs on? WSUS cannot do that. The best it can do (that *I* see) is to schedule pacthes for install at 2:00am, and then when the user logs on in the morning you tell it to make up the missed install within 1 minute of logon. That is kludgy to me.

Our policy where I work is this:

"No workstation will log onto our enterprise network without being fully patched. Ever. Period."

WSUS cannot enforce that policy. With WSUS in place, a staff member could install a gold-level Windows XP, add the PC to the domain, and this unpatched/vulnerable machine will sit on our network for possibly an entire day before WSUS would deploy. Or am I wrong about this?

What we have been doing since 2003 is using a custom scripting solution. It runs as a service account and does not require the user to be a local admin. A startup script runs on all machines. It runs MBSACLI (currently 2.0) which scans the machine and produces an XML output. The XML gets parsed, and an array of all needed patches is built. A report of this scan is dropped on the network for future reading. Then that array is for-each'ed and each patch is applied from a file share on the network. Error codes are recorded and a report is generated. Missed error codes will generate an email. The machine is rebooted. Next reboot, it gets scanned again (this takes about 10 seconds)....if it passes, the user can log on.

If the machine is still missing one of the same patches (meaning one didn't apply) an email is sent to the help desk, and only an administrator is allowed to login to the machine. (the logon script detects the partial install and immediately logs a normal user off).

If a workstation simply refuses to install a particular patch, one of the support staff can exclude that patch for that workstation via a central INI file that controls the patches. Then somebody can figure out the incompatibility or whatever.

So under normal day-to-day conditions (when no new patches are released), the net impact is that the workstation startup is delayed by about 10 seconds while the MBSACLI scan runs. Not a big deal. We also run an hourly scheduled task. This task checks to see when the last reboot was. If it was more than 12 hours, it will run the MBSACLI scan itself and apply the patches. By changing an INI setting we can have all machines scanned (and consequetly patched) every hour if we wanted.

Patches are downloaded by a scheduled server script simply by parsing the XML inside Microsoft's WSUSSCAN.CAB file and HTTP GET'ing all EXE's applicable to our environment. As each is downloaded, the script looks at the file properties and determines what kind of patch it is (update.exe, etc) and depending on the patch type will generate an INI containing the switches to use (usually "/quiet /norestart", "/q", or "/q:a". Some of the older NT patches will use "-qmz".) I will admit that this step does sometimes require some human intervention...Sometimes we need to manually run a patch with /? to figure out its command line parameters. Once in a while we find a patch that will ONLY work interactively....and we have to look at other ways of deploying.

Is this complicated? Somewhat. Am I the only one who can support it? Unfortunately, yes. I have INI-ized most of the configurable options. Any workstation can be exempted from one or all patches based on any number of conditions, simply by using basic INI settings. There are also AD groups which can be used to apply test patches before general relase, etc. So the support staf can run this thing without my help. But if Microsoft were to change their XML file format or something, it would require a kix coding change.

So while our solution works very well (for now at least) I definitely WISH I could use WSUS for patch management. I just don't feel it offers the kind of enforcement and flexibility we have with our scripted solution. Also, I don't like knowing that with WSUS my patch management system is reliant on an IIS and MSDE backend. Either one of those pieces breaks, and patches don't happen.

At the moment I am looking at a WSUS backend with a much simpler client-side startup script similar to the one linked to above. (on the innotech site I think it was). WSUS is a very nice step in the right direction, but it still needs some more deployment flexibility before I am ready to use it.

Long-winded...but those are my thoughts on the issue of WSUS vs. scripted solution.


Edited by sixdoubleo (2005-11-16 06:42 AM)

Top
#151531 - 2005-11-16 08:41 AM Re: Automagic Windows patching
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Quote:

"No workstation will log onto our enterprise network without being fully patched. Ever. Period."




Hmmm... somehow I doubt that. It's Monday and 1,200 machines logon - all patched. It's now Tuesday and Microsoft/Oracle/WinZip/Citrix have all issued numerous CRITICAL patches that allow any user to easily gain FULL access to an infected system.

I seriously doubt you have any method in place to KNOW and PREVENT all 1,200 systems from logging in.

You might be able to patch them that day or the next day, but that is not the same as your statement.


Sounds like you have it working though how you like in general, but don't forget that Glenn Barnas also posted some advanced scripts to work with WSUS and manage many of the shortcomings using KiXtart.

 

Top
Page 1 of 2 12>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.083 seconds in which 0.035 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org