Clear .TXT Files with a Windows Batch Command

Posted on

Powershell Use this batch command or batch script in the command prompt to clear a text file blank in Windows using the command line. The function ERROR_FUNC does not exist and this throws a blank output towards the file in the parameter below. This should work for any kind of output format.

SET XML ="%CD%\Pathtofile"
SET @ERROR_FUNC. > "%XML%"

The code is best used for clearing log files without the need for VBScript or CScript. Here’s sample code below clearing an XML log file:

@ECHO OFF
SET XML=%CD%\Project\Contents\Main\components.vxml
@ECHO Clearing %XML%\
CRASH_TEST > "%XML%"

@ECHO Writing file %XML%
(
    @ECHO ^<?xml version=^"1.0^" encoding=^"utf-16^"?^>
    @ECHO ^<components xmlns:xsi=^"http://www.w3.org/2001/XMLSchema-instance^" xmlns:xsd=^"http://www.w3.org/2001/XMLSchema^"^>
    @ECHO ^</components^>
) >>"%XML%"

@ECHO Done
PAUSE

Improve RAID Performance on Intel Based Motherboards by Storage Driver Update

Posted on

Here’s a good tip: My 160 GB Seagate hard disk started to fail so I decided to try RAID 0 on my old Intel DG965WH motherboard. I purchased two 320 GB Western Digital Caviar Blue (WD3200AAJS) drives. I mounted the drives on the system and installed Intel Matrix Storage drivers in Windows 7. I ran a benchmark on HDTach and was satisfied. I checked for a newer version of this driver but found nothing. After 2 months I learned that the new version of this driver is called Intel Rapid Storage. I was not expecting any performance boost at all but when I ran the benchmark again it showed a 28% increase on sustained rates! Check out the videos below (best viewed in 480p):

This is the HDTach result while using Intel Matrix Storage Technology

This is the HDTach result while using Intel Rapid Storage Technology, see the huge difference on both sustained and burst rates of the drive

How to Spot a Good Motherboard

Posted on

I was recently browsing the web to check the price of my motherboard, when I found something surprising. I purchased my Intel DG965WHMKR motherboard for Php 6,500.00 back in May 2005, and as I was checking the prices I found out that the average price for this motherboard is currently and possibly for the year 2009 would be at Php 6,100.00 and that price is for outside the Philippines. How much more would that be if the board is to be purchased here it probably would cost at least Php 8,000.00. Anyway, here are some tips to picking a good board.

 

intel dG965wh motherboard

Here’s the first tip: Good motherboards will always be hard to find. No matter how much publicity you see for a motherboard it is always best to check the net for forums that have user opinions on the boards. Be careful though some companies use SEO tactics and do shameless self promotion with their products. A good tip would be to check the forum poster’s number of posts, the higher the posts the better.

 

Second Tip: If you are a computer enthusiast, a good motherboard for you would be one that is fully customizable. I can’t give out any suggestions on what motherboard brands to purchase but look for one that has good warranty coverage. This is so that you can relax easy while overclocking or concocting a new super computer that can rival Google’s servers.

 

Third Tip: If you are not a computer enthusiast and want a motherboard that is budget wise and will last for a long time, go for Intel motherboards, not motherboards with Intel chip sets but motherboards that are manufactured by Intel. I can assure you Intel boards, with regular maintenance (anti-virus, defragmenter) can last to more than 6 years based on personal experience. This is backed up by the fact that Intel has been producing server motherboards for IBM mainframes for a long, long, long time already.

 

Lastly: Picking the motherboard should be the task that will take you the most time when building a system. Keep in mind that the motherboard is the glue that will bind every component of the PC and so it is very important to choose carefully. I have always noticed since computers were sold as packages at stores here in Davao, store owners will not put the motherboard brand on the package list. They usually think that the system is good to sell as long as the CPU is fast, the hard drive is spacious, the monitor has a large and clear screen, the memory is high and the video card. I always end up asking “What’s the motherboard of this package?”

 

pc 005

* I have owned this computer since May 2005, even though I have been quite abusive to the computer such as turning off the CPU by holding the power button and even pulling the plug immediately, I still have the original installation of Windows XP running on the machine from the day I purchased the system. (“Original Install Date: 5/7/2005, 11:24:05 PM” – You can check for your installation date by executing the “systeminfo” program in the command line of Windows XP.)

 

PS: Lastly, the motherboard that I would not recommend you purchasing would be ASUS motherboards. Even though ASUS has good marketing, IMHO, I don’t think they produce high quality motherboards. I am saying this because I have a lot of friends who own ASUS motherboards and they always keep asking me for help on something such as unexpected restarts and BSOD which I will not be able to fix because I have traced the problem as part of the hardware. As a systems administrator, web developer and programmer I have used and fixed a lot of comptuers that run on ASUS motherboards one such example that would be easy enough is when I am updating the BIOS, I distinctly remember two units with ASUS motherboards failing the update and rebooting to the old BIOS. Another problem I have with ASUS motherboards is that when you try to check their website for drivers, most of the drivers are dated back when the motherboard was released. I would not even bother installing the auto updater that comes with the CD for the motherboard in the office because it would only be a waste of memory.

 

And if any ASUS motherboard fans are reading this here are two things to think about. ASUS produces about 15 to 30 new motherboards per year (this is due to the fact that they also produce motherboards for AMD) while on the other end, Intel produces about 5 to 9 new motherboards per year. Another thing, with that much marketing and publicity how much do you think they will have left for funding research and development?

MagicJack Installation, Firewall Setup and Port Settings

Posted on

UPDATED ON APRIL 7, 2011 Magic Jack, this amazing usb device will allow you to make unlimited calls to the US and Canda for $20.00 per year and better yet, you get a registered landline number that allows you to receive calls. I’ve found a lot of sites on how to set up routers, firewalls and access points to allow Magic Jack to pass through. None of them worked. It was agitating so I had to do some tests on my own. Read on for the complete port lists.

 

magic jack dongle

 

Magic Jack is very easy to install in the first place. Just plug it in and then plug your phone to it. The executable or installer should run automatically, if not open the flash drive, find it and then run it. The next part will deal with firewalls and port settings.

 

I used Active Ports to find out what ports MagicJack was using and it turns out that it uses a lot of UDP ports and two TCP ports. Their website specifically states that the device only uses UDP ports 5060-5070 (reference: LINK (removed) – GOOGLE’S WEB CACHE OF THE PAGE UPDATE April 7, 2011:The knowledge base has been down for a while but I managed to retrieve Google’s cache of the site.) which I found out was clearly not true. I found this out by performing calls to a random list of phone numbers (except 911 numbers ^_^). I dialed at least 40 phone numbers repeatedly. After this, I was able to conclude that MagicJack uses random UDP ports in the high range. UDP ports might seem a bit less important than TCP ports but as a Systems Administrator this will create a highly unsecured and exposed network. I was only able to achieve 100% connectivity with the 40 phone numbers after opening a range of UDP ports.

 

magicjack ethernet dongle

 

I also stumbled upon a lot of sites and forum posts that tell magic jack users to setup port forwarding, this is NOT true!

 

Below is the exact list of the TCP and UDP Ports that I had to open in my firewall and router (NOT port forward) to achieve 100% connectivity:

 

TCP Ports List: 80 (HTTP), 443 (HTTPS)

UDP Ports List: 5060, 5070, 10000-65535

 

It is really strange why the device was designed like this. My guess is that the device is intended solely for home use and not commercial use.

 
 
 

Intel Extreme Motherboard D5400XS (Skulltrail), the Overclocked Server!

Posted on

Intel SkulltrailIntel’s latest top of the line motherboard, the Intel D5400XS, is the only desktop motherboard that I can say can perform as a gaming rig as well as performing the duties of a 24/7 server. It might be a pointless,stupid and unnecessary idea to do so because this would boost the price tremendously so no one will be able buy this board but that is just what Intel is all about.., to be able to balance extreme reliability and extreme performance. I dubbed it as the first ever retail "Overclocked Server" even though it is not a common thing to overclock servers. c(”,).

I am an avid fan of ATI and AMD as gaming platforms but since I work as a Systems Administrator, Software Developer, Web Developer and a hardcore Gaming enthusiast, I will always prefer a motherboard and a processor that can handle such tasks that pertain in each category, power, reliability, speed, efficiency and have good support. Based on my experience maintaining AMD class workstations (use, udpating bios, installing, formatting, bios/OS optimizations etc..), AMD is just not cut out to do this, AMD will always be for extreme graphics games and light computer processing. This is due to some motherboards that support the AMD platform, I will probably write a future article on why this is so. This motherboard however is a supports of all of the above. I was so amazed seeing this board when it first came out in February of 2008. Back then I was expecting if there was ever going to be a Pentium 5. Intel also does not support overclocking in their boards but this board is in the Extreme Series so it can do overclocking as well.

Intel® Desktop Board D5400XS (Retail Edition)
Intel Desktop Board D5400XS

As a Server and Workstation

dbextreme_74.gifThe Intel D5400XS can support 8 cores and is based on a Xeon supporting motherboard, Intel’s Xeon supporting motherboards are the best there is when it comes to reliability, as an example, Xeon class motherboards are used by IBM in its servers. I as a Systems Administrator have dealt with IBM Servers, they are very reliable and can be left on for months without slowing down and in my experience as an Intel user I too know how Intel boards are well built. My previous computer has Pentium 3 motherboard D815EEA2, it lasted me 5 years formatting only twice in that span. Dual booting with Windows 98 and Windows XP, it ran for at least 5-8 hours a days because my sister also uses it in the evening for her school assignments and other online activities, plus I leave it running to do downloads and uploads. I do not even hesitate or get scared in updating Intel’s motherboard BIOS, it’s just that reliable. It was the opposite back then when I still had a motherboard with a VIA chipset running S3… >_<

As a Gaming Platform

Let me just say one thing. Triple-crossfire support I do not know about Quadfire, looking at the board I do not think it will fit. Too bad for NVIDIA though it can only support 2 SLI and not triple. c(”,)

/hmm: It is a bit weird thought though, ATI is owned by AMD but Intel supports ATI over NVIDIA…

All in All

It’s an extremely good board! A bit expensive though but if you need a well balanced computer that will last you a long time, let us say 5 years or more, This motherboard or perhaps any Intel motherboard would be the best way to go.