Friday, September 19, 2008

Windows XP Installation Hangs at Setup is inspecting your computer’s hardware configuration

Been trying to install Windows Xp on one particular machine and it always stop at "Setup is inspecting your computer’s hardware configuration". After google from the internet, realise that Windows Xp is very particular when you try to install over an used disk - means you got some non-windows partition inside (example: Linux). To solve it, i use the ultimatebootcd to delete all the old partitions and it works after this.

Tuesday, September 9, 2008

Script to ping a range of IP address

I wrote this script last week as i need to find out the IP address for particular storage box. Is not really neat but it did help me in identify the IP address without me brute force myself. To use it, you need to copy and paste the following lines into a text file and save it as "something.vbs". After that just click on it abd the result will be saved in the ping_result.txt file.

'Create a file to write the result

Dim objFile, strGuyFile, strFilePath
strFilePath = "ping_result.txt"
Set objFile = CreateObject("Scripting.
FileSystemObject")
Set strGuyFile = objFile.CreateTextFile(
strFilePath, true)

' Create shell object to run ping
Dim objShell, subnetID, range, result
subnetID = "192.168.37."
Set objShell = WScript.CreateObject("WScript.
Shell")

For range = 2 to 254 ' the range of ip we want to test

Set objScriptExec = objShell.Exec("ping " & subnetID & range & " -n 1")
result = objScriptExec.StdOut.ReadAll
WScript.Sleep 500
strGuyFile.Write(result)

Next

strGuyFile.Close