Why does extracting a zip in vista take forever?

I think I’m going to have add a post category for ‘vista annoyances’!

Why when I extract a zip file with the in-built windows compression utility, does it take a ridiculously long time to complete! I’m fed up with this now, I’m installing 7Zip.

VBScript form spam blocker

I don’t do a great deal of classic ASP any more, but today I had to knock up a quick function to try and filter out those annoying form spammers. You know the ones, feedback forms submitted with just URLs pointing to pr0n and viagra sites!

Anyway, I came up with a function that counts URLs in a block of text –

Function UrlCount(text)
dim strRegex
strRegex = "(https?://)?(([0-9a-z_!~*'().&=+$%-]+: )?
[0-9a-z_!~*'().& =+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|
([0-9a-z_!~*'()-]+.)*([0-9a-z] [0-9a-z-]{0,61})?[0-9a-z].[a-z]
{2,6}) (:[0-9]{1,4})?((/?)|(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)"

'Prepare a regular expression object
Set myRegExp = New RegExp
myRegExp.IgnoreCase = True
myRegExp.Global = True
myRegExp.Pattern = strRegex

Set myMatches = myRegExp.Execute(text)
UrlCount = myMatches.count
Set myMatches = nothing
Set myRegExp = nothing
End Function

Thanks to this url regex I had it sorted in no time 🙂

Usage –

If UrlCount(variablecontainingfieldvaluetocheck) > 1 then
' you could use 2+ above if you don't want to be so strict
' do something nasty like drop a 404
End If

Anyway, let me know if you find it useful or have any suggestions for improvement.

More vista annoyances

Well, I’ve been using vista now for long enough to have experienced a few of it’s annoyances –

  • Why when I leaved my wired connection in the office and then try to connect to my wireless connection at home later do I have to restart the machine in order for it to pick up the access point? Turning the wireless off then on again doesn’t help, putting the laptop in and out of sleep doesn’t help either. This was not an issue in XP.
  • Why when my network connection (wired or wireless) has a slight blip (which it seems to do regularly) does vista insist on popping up a dial-up networking box (usually at the bottom of the window stack) asking me to connect via my phone over bluetooth? There doesn’t seem to be anyway of disabling that dial-up connection so that this doesn’t happen, I don’t want to delete it as I do use it from time to time! Again, not an issue in XP.

So, both network related. On a brighter note, I’m really pleased with the way vista seems to connect to and authenticate to, remote machines via UNC paths. On XP this was a real pain, you’d type in a path, wait a number of minutes for an authentication dialog, enter your credentials then wait a further extended length of time. This now seems almost instant on vista which is really nice.

UPDATE: I think I may have fixed the second one, while in ‘Network and Internet > Network Connections’ I right clicked the dial-up connection (looking for a disable option) and saw an option for ‘Cancel as default connection’ option, let’s hope that fixes it!

UPDATE: It didn’t 😦

So, what’s annoying you with vista?

Visual Studio 2005 + Vista = Annoying

I’ve recently upgraded to vista on my laptop at work and am getting increasingly annoyed by one ‘broken’ aspect. Why can I no longer drag files from an explorer window into a ‘Solution Explorer’ in VS?

I’m assuming it’s something to do with them running as slightly different users as I have to run VS ‘as administrator’, well that’s what MS advises anyway.

I do hope this is fixed soon!

Posting again

It’s been a while since I’ve posted anything and to be honest things have been pretty hectic.

Hopefully that’s about to change so expect updates soon 🙂

Posted in General. 1 Comment »