Sunday 24 February 2008

Thursday 21 February 2008

XP : Windows Updates 'Stuck'

My work pc (xp, sp2) has automatic updates turned on (not my choice).
For the past few days I have had a some 'stuck' updates that just sit in my taskbar and won't install!

A quick google reveals I dont even need them :(
KB937060 and KB937061 are visual studio 2005 security updates for crystal reports, which I dont even have installed.

Anyway, the pc performed extremely badly whilst repeatedly failing to install these updates. A generic host process 'svchost.exe' was eating memory and periodically utilising 100% of processor time. Whilst trying to sort out the mess, I came across this script to reset Windows installer.

Steps -
1) Run this script (put in a .BAT file and run it).
2) Download essential updates from windowsupdate.com
3) Reboot

net stop wuauserv 
net stop bits
rmdir /s /q %windir%\SoftwareDistribution\
REGSVR32 WUAPI.DLL /s
regsvr32 wuaueng.dll /s
REGSVR32 WUAUENG1.DLL /s
REGSVR32 ATL.DLL /s
REGSVR32 WUCLTUI.DLL /s
REGSVR32 WUPS.DLL /s
REGSVR32 WUPS2.DLL /s
REGSVR32 WUWEB.DLL /s
net start bits
net start wuauserv
wuauclt.exe /resetauthorization /detectnow

Wednesday 20 February 2008

Tuesday 12 February 2008

Vista SP1 Cleanup Utility - vsp1cln.exe

As if Vista didn't already take up enough disk space, it has hogged some more with the SP1 install. It uses double the amount of disk space due to leaving behind temporary installer files!

To release these files (several gig on my installation), run vsp1cln.exe from a command prompt, as below >

Blogging : Source Code Highlighter

I have changed over to Alex Gorbatchev's excellent Syntax Highlighter tool for source code blogging and have spent the evening coding back through my posts to apply it (yawn)...

this is what it does for you (excuse the old school example code) -

10 print "hello world!"
20 goto 10

here is where to find it -

http://code.google.com/p/syntaxhighlighter/

Monday 4 February 2008

Error scripting SQL Agent jobs

" Msg 515, Level 16, State 2, Procedure sp_add_job, Line 137
Cannot insert the value NULL into column 'owner_sid', table 'msdb.dbo.sysjobs'; column does not allow nulls. INSERT fails.
The statement has been terminated. "

This occurred scripting a job from one server to another.

The solution? Create the user that owns the job first!