Rotating URL Script – Dashboard Display

Iv been looking for a tool that will display web pages for a period of time and then cycle through to the next page,  performing a loop for usage on large LCD TV screen at work,  this is to be used to display IT Service performance information and status reports.

I was unable to find one that did what I wanted,  bar 1, although it suffered from a problem where after a few hours Internet Explorer would start to die, and it had to be restarted.

I decided to write my own script, and so here it is.

Read more

Taskkill – Kill All Process’s Of A Certain Name

So you may have run something thats spawned a whole bunch of processes,  iexplore.exe  or cscript.exe ,  you need to kill them all and fast.   Heres how

1
taskkill /F /IM iexplore.exe

Useful Windows Run Commands

A whole bunch of very useful Windows commands

Read more

Task Scheduler – The following error was reported: 2147944309.

This common task scheduler message is cryptic, and means nothing without some digging,  you can see below how we find the true answer to what it means,  but the short answer is:


Account Is Locked Out

Why?
0n2147944309 = 0x80070775
Facility: 8007 = Win32 (it’s a “Win32″ status code)
Status: 0x775 = 0n1909
Q:\>net helpmsg 1909
The referenced account is currently locked out and may not be logged on to.

T-SQL Setting Date Format

Occasionally you need to run a DATEDIFF or DATEADD against some dates that are in a reverse format, ie Day:Month:Year instead of Month:Day:Year, theres a simple way to set this in your query without having to string handle it all, using the SET DATEFORMAT parameter.

1
2
SET DATEFORMAT dmy
SELECT DATEDIFF(MINUTE,'29-01-2010 09:13:18','29-01-2010 09:18:18')

Windows Task Scheduler – Corrupt Image Error Fix

For some reason now with Vista and Windows Server 2008 when ever you seem to create a scheduled task, but close it before saving it, you get a “Corrupt Image” error that will not go away unless you remove the “Corrupt Image” from the registry.

Heres how to fix it

  1. Open The Registry (Start > Run > regedit)
  2. Browse to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache
  3. Under the “Tree” folder, find the scheduled tasks that you are having the error with and delete their folder.

Thats it, now re-open task scheduler and the error should be gone.

Copy your servers PHP.INI

Occasionally you may need to override your hosts or servers PHP.INI config file.  If you do, you’ll want a copy of the original PHP.INI as a basis for your modifications.
You can make a copy of it to your new directory by running a PHP script with the following

1
< ?php system("cp /usr/local/php5/lib/php.ini /home/your-new-path/php.ini"); ?>

Piracy and R18+ Games

So another game has been banned from Australia (Aliens vs Predator), and this time the developers are refusing to censor the content.

And I don’t blame them.

Why spend years developing and testing a game, finally deeming it ready for production only to have some narrow minded Government on the opposite side of the world tell you It needs to be re-edited so a 14 year old can buy it. I know what id tell them.

Read more

Ping Host From VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
' --- ping the ip adress in the string s_ipaddr, and get
'     the response time in the int32 n_response

 
Imports system.net.networkinformation
Dim ping As New System.Net.NetworkInformation.Ping
Dim reply As System.Net.NetworkInformation.PingReply
reply = ping.Send(s_ipaddr)
If reply.Status = IPStatus.Success Then
' --- handle reachable here
MsgBox("ping time " &amp; reply.RoundtripTime)
Else
' --- handle non reachable here
End If

Pinger! – The Mass Host Ping Tool

Current Version v1.3 – Download Now

Pinger! is a tiny ping utility (13KB) that is used to quickly ping a large list of hosts and save the resulting successful and failure host lists into a text file.

Why?

When developing scripts and applications that will touch a large number of hosts,  if many of those hosts are offline or no longer exist, the timeouts involved with this can slow down execution time and dramatically slow down your script or application.

In my case, I was presented with a list of 600+ servers that needed to have the exact same script run against them, a successful server took only several milliseconds to finish,  a failed host took around 4 seconds to time out, clearly I needed to find out which servers were alive and which weren’t and further again I needed to list the successful servers in a clean text file, 1 host per line, so I could import this into my application as an array.

And hence Pinger! was born :)

Usage

Very simple, Pinger.exe when run looks for hosts.txt in the same directory. Simply enter in your list of host names in this text file,  one per line and Pinger! will run over them 1 by 1 and output the results.
Simply extract the .zip containing Pinger.exe and hosts.txt to the same directory and open Pinger.exe.

Output

2 files are outputted.  these are:

  • success.txt  – The list of successfully pinged hosts, in per line format
  • failure.txt – The list of hosts that failed to ping, in line by line format.
pinger

 

Download v1.0