WMF notes
02 Jan 2006In here attempting to patch the 35 or so Windows machines that we've got at work. So far, it looks like I should be able to do this remotely using SSH and Cygwin. That depends, of course, on having very fucking silent ways of running everything. So far this has worked for me, on XP/SP2 and 2K/SP4:
regsvr32: None of the bits I've seen from SANS mentions it, but there is a silent option. Do it like so:
regsvr32 /s /u %windir%\wystem32\shimgvw.dll
However: I cannot get%windir%
to work with Cygwin. According to this it should work as%WINDIR%
, but it doesn't for me. Two things do seem to work: either change directory to/cygdrive/c
(Cygwin-specific location of the C: drive) and use an absolute path (winnt\\system32\\shimgvw.dll
), or runCMD
to get a DOS/Windows shell and use%windir%
.The Unofficial Patch: Use the options:
/VERYSILENT /SUPPRESSMSGBOXES
However, it has problems if you try applying it on a machine that already has had the patch -- remotely, execution will just hang. If you run it locally w/o those options, you'll get a message saying it's already been applied; I guess that case is not handled well when run silently. Oh, and when the patch is applied silently, it'll reboot the machine immediately and without warning.
Thanks to Cygwin, I've got SSH running on most Windows machines here; I should be able to come up with some way of doing this all in one step. I'll post whatever I can figure out.
Update: Yep, a simple batch file does the trick:
regsvr32 /s /u %windir%\system32\shimgvw.dll c:\cygwin\home\Administrator\wmffix_hexblog13.exe /VERYSILENT /SUPPRESSMSGBOXES
chmod 755 both the batch file and the fix, and away we go. The machine passes the test made by the guy who wrote the unofficial patch, which is as close as I think I can come to being sure that it all works. Further Update: Four hours later, done...but I've finally got SSH set up on the few machines I had left, so that's what took up most of the time.
3 Comments
From: Zen
02-January-2006-12:51:45
SeeAlso: if you've got admin access on each of the workstations, check out SysInternal's PSToolkit, which gives you all sorts of pretty command-line remote execute tools.
Assuming, of course, you haven't already gone this route (and that's "rowt," not "roote,") and CygWin's easier.
Either that, or an SUS/WUS server, which is (last time I checked) FREE to run on any box with IIS. Of course, then you have to convince all of your machines that they really should check for updates every X days/hours, and that they should check for updates from \\WusBox instead of windowsupdate.microsoft.com.
From: Saint Aardvark
02-January-2006-13:01:18
Thanks for the tip. I've actually been figuring out a way to use Perl, SSH and mbsacli.exe to maybe get some command-line scripted goodness to apply patches. It's essentially a rewrite of Ivy to use mbsa rather than HFNetfix. And yeah, Sysinternals rocks.
Thanks for the tip re: SUS, but I simply don't trust MS enough to have one of their servers around...doubly so after this. I'd much rather do it another way, if at all possible.
(BTW, tried to email you earlier today, but I got a bounce from postmaster at geckotemple.com. Let me know if you want the text...)
From: Zen
02-January-2006-19:34:17
Yeah, forward it to my work account. Was wondering if things were queueing, or just spinning off into space. Damn me and my Exch2000 -> Exch2003 migration silliness.
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018