Wednesday, February 20, 2013

Create Shutdown, Restart, Log-off, Hibernate, Switch User Start Tiles for Windows 8 / Server 2012 featuring Metro Icons

Create Shutdown, Restart, Log-off, Hibernate, Switch User, Start Tiles for Windows 8 / Server 2012 using updated Metro Icons

I created one script that creates tiles for popular user/power links with new Metro icons.

Metro Style Icons created, improved look


This 
PowerShell script installs a Switch User, Log-off, RestartHibernate and Shutdown tile with new Metro icons on the new "start" screen for Windows 8+/Server 2012+.

Download and install Win8PowerUtilsTileScript.zip, see license/instructions below.

Tired of the old icons that have not been change since Windows 95, upgrade to modern Metro styled icons.


License:

The script is free to use and sourced from Microsoft Gallery. The icons are free to use for personal use, but not commercially. Commercial/Small businesses requires a license to buy the rights to use the icons, which I created. Don't get shocked, we are talking pennies here. License and Disclaimers listed in scripts.

             Contact metadataconsult@gmail.com for a commercial license.

Instructions: 

Download script Win8PowerUtilsTileScript.zip

1. Unzip and copy contents to c:\Windows\System32 directory. 

Click to see large image.































2. Right-click on doWin8Tiles-RunMe1st.ps1 and Run with Poweshell. This loads the Poweshell Editor (ISE) with administrator privileges.


3. In Poweshell Editor (ISE), press green arrow to run script.
ShutdownRestartLogoffSwithUserWindows8MDCTiles.ps1 Powershell script
4. If you see, the above the you have successfully run the script. If you see red, you may have re-run the Powershell IDE with administrator priveledges. Use Windows Search for it and run with adminstratative privelegdes, see article here.






Tuesday, February 19, 2013

Jformer - Created new validation type - alphaWords = alphaDecimal + spaces





















jFormer is a form framework written on top of jQuery that allows you to quickly generate beautiful, standards compliant forms. Leveraging the latest techniques in web design, jFormer helps you create web forms that:
  • Validate client-side
  • Validate server-side
  • Process without changing pages (using AJAX)
But it does lack a basic validation type that would expect from such a library, a validation type that could allow for spaces. I took the alphaDecimal base type and added spaces. 

That is exactly what I created, I called it using Jformer parlance alphaWords. 

alphaWords - Accepts only letter, numbers and spaces

Positive Validation Example : John Doe
Also extended the base type to handle periods and dashes and called it  

alphaFirstNameRestricted - Accepts only letter, numbers, periods, spaces and dashes.

Positive Validation Example : John-Doe Jr.


Friday, February 15, 2013

Turning off Java for IE9

Test if JAVA plug-in is turned off safely here.... 

How To Disable Java in IE9 (Java Version 7.07 or less) – The two methods below may not disable Java in all circumstances and therefore may not protect against malware attacks such as this week’s new 0-day Java Security Flaw. [see US-CERT.gov for a detailed list of the steps required to totally disable Java - they are extensive and very complex]

For this reason we now recommend uninstalling Java completely or using a different web browser (e.g. Firefox or Chrome) to reduce the risk of malware attack.There are 2 alternative methods – a registry tweak and a Java Control Panel tweak.
Manage Add-ons - Java is disalbe for IE9 DOES NOT WORK.















Here is the result:




















Registry Tweak  Be careful when editing the registry – create a system restore point first.
To disable Java in IE, close IE and then use Regedit to open the Registry and change the value of the UseJava2IExplorer registry key to 0 (zero) instead of 1.
Depending on the version of Windows and the Java plug-in, this key can be found in one of these locations:
  • HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Plug-in\{version}\UseJava2IExplorer
  • HKEY_LOCAL_MACHINE\Software\Wow6432Node\JavaSoft\Java Plug-in\{version}\UseJava2IExplorer
Open IE and test Java – you should find it is now disabled – at least as far as online tests are concerned. If you want to re-enable Java in IE just change the registry key value back to 1

Better still, update your Java and follow this:
http://www.java.com/en/download/help/disable_browser.xml

Test again and this should do it.



Tuesday, February 5, 2013

Google Gmail Barracuda Spam Report - Prevent Google marking you email as SPAM

If you find that your website is sending legitimate mail is marked as SPAM, I have a solution for you.

Problem Statement: 

A client's site used PHP mailer program (http://sourceforge.net/projects/phpmailer/?source=dlp) had been set-up to perform standard website communications with a web-user, such as sending confirmation emails for membership sign-ups and contact forms. However, Google's was reporting that emails sent from the site where reported as SPAM in Google Gmail.

Detail:

Google uses Barracuda Spam Filter  and allows for custom rules that are set by the individual company so there is little documentation concerning them. 
So BSF_SC0 denote custom rules, some are easier to decipher than others. There's no documentation about these rules or else Spammers could get around them.
An example of the SPAM report is shown below:
Sample Google Email SPAM report



X-Mailer: PHPMailer [version 1.73]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset="UTF-8"
X-Barracuda-Connect: {your server}
X-Barracuda-Start-Time: 1360037921
X-Barracuda-URL: http://6{your server}/cgi-mod/mailer.cgi
X-Virus-Scanned: 
X-Barracuda-BRTS-Status: 1
X-Barracuda-Spam-Score: 1.57
X-Barracuda-Spam-Status: No, SCORE=1.57 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.5 tests=BSF_SC0_MISMATCH_TO, BSF_SC0_SA620b, BSF_SC0_SA_TO_FROM_DOMAIN_MATCH, HTML_MESSAGE, HTML_MIME_NO_HTML_TAG, MAILTO_TO_SPAM_ADDR, MIME_HTML_ONLY
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.121844
 Rule breakdown below
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.00 BSF_SC0_MISMATCH_TO    Envelope rcpt doesn't match header
 0.00 MAILTO_TO_SPAM_ADDR    URI: Includes a link to a likely spammer email
 0.00 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
 0.00 HTML_MESSAGE           BODY: HTML included in message
 1.05 HTML_MIME_NO_HTML_TAG  HTML-only message, but there is no HTML tag
 0.50 BSF_SC0_SA620b         Custom Rule SA620b
 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH Sender Domain Matches Recipient
                            Domain


Solution:
I developed a solution to get around these errors. This can be used for any website emailer program, but primarily for PHP based solutions such as Wordpress, Drupal, Joomla!, etc.

If you need to solve these issues, contact me for a consultation.

Friday, February 1, 2013

Free S.M.A.R.T Hard Drive Monitor for Windows 98, XP, Vista, 7, 8


S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology; often written as SMART) is a monitoring system for computer hard disk drives to detect and report on various indicators of reliability, in the hope of anticipating failures.

Download a free for personal use copy of 
PassMark DiskCheckup ™ utility here. Great commercial grade and supported software. 


For open source and alternatives see Wikipedia's list https://en.wikipedia.org/wiki/Comparison_of_S.M.A.R.T._tools

In order of preference; 
  1. CrystalDiskInfo - build by Japanese developer Noriyuki Miyazaki a Microsoft MVP.

    Great utility, that show temperature per HD in system tray. It supports 
    HDD/SSD utility software which supports a part of USB connection and Intel RAID. Adware removed now,
  2. GSmartControl - Hard disk drive and SSD health inspection tool * 

    GSmartControl is a graphical user interface for smartctl (from smartmontools package), which is a tool for querying and controlling SMART (Self-Monitoring, Analysis, and Reporting Technology) data on modern hard disk and solid-state drives. It allows you to inspect the drive's SMART data to determine its health, as well as run various tests on it.
  3. HDD Guardian provides a Windows front-end for smartctl, a utility which monitors your hard drive(s) and SSD(s) for health status, taking advantage of S.M.AR.T. tool as provided by https://www.smartmontools.org/. But no individual temperature gauges per hard drive.

Windows XP Basic Optimisation Tips - Oldie but a Goldy


You can spend hours tinkering with little system adjustments in the registry and ini files trying to get the most speed and performance out of Windows. While all the tinkering can make a small difference, you get 80% improvement with only 20% of the effort. It is better to do the simple stuff first before trying any of the nitty gritty. Also, once you start tinkering in the registry, there is a chance you will actually slow things down, or even worse. 

 The slowest part to any PC (except for the user) is the hard drive. It is orders of magnitude slower than the Memory or CPU. So it makes sense to spend a few minutes configuring Windows to make best use of your hard drive.
The following procedures work on all versions of Windows from 95/98/ME to NT/2000/XP, with a few XP specific ones at the end. 

Disk Errors

Something that is often overlooked, even by IT professionals, is to make sure your disks have got no errors on them. Crashing programs, power interruptions and even the infamous computer gremlins that all computers house, eventually create errors on your hard drives.
Make sure you run the disk checking program every so often. Select all the available options for checking, do this for each of your hard drives (i.e.. c: d: ...). You may need to reboot your computer for it to complete the check at boot time.
You can find this program by double clicking My Computer, right click your hard drive, and select Tools from the dialog box.

The Paging File

The paging file (also called: Windows swap file or virtual memory file) is a system file that Windows uses when it runs out of actual RAM. Windows, by default,  configures itself to control it's own paging file. This is not the most efficient method, as Windows will continually increase and decrease the size of the paging file, thus causing long, slow disk accesses and fragmenting the file. If you find your computer trashing the hard drive quite often, this is a sign of bad virtual file management (it can also be a sign that you don't have enough RAM, the more the better, always!).
It is much better to define your own paging file size. To do this, right click My Computer, select Properties -> Advanced -> Performance Settings -> Advanced -> Virtual Memory, Change. (Slightly different depending on which version of Windows you have)
You should see a box similar to the one shown here. Select to use a custom size and set the Minimum and Maximum  sizes to be the same. A good size is about double how much RAM you have, or about half again what Windows recommends.
You will may get a message that this is not recommended, click Yes, and a reboot will most likely be needed.

Boot Menu


After this change, if while using your computer, it complains that it is running low on virtual memory, you can increase the values you set. If you have XP or 2000, open up all the big programs you use at once. Then  bring up task manager ([CTRL] + [ALT] + [DEL]), click the Performance tab, now check the Commit Charge Peak , if it is getting close to the Commit Charge Limit, then you need to increase your paging file size.

Temporary File Cleanup

Programs and Windows use a folder for their temporary files. Not all of the programs clean up properly after they are done. So after a while your temp folder gets full of left over files. There can easily be over 100 MB of files in there that serve no purpose. To clear these out, Click Start -> Run -> type %temp% -> OK.
In the window that appears, select everything and press [Shift] + [Delete] keys together. Shift stops the files going into the recycling bin.

IE Cleanup

If you use Internet Explorer to browse the web, it is probably using up way too much space for it's temporary cache. The default value is always too high. I suggest 10 MB as it's cache size. You find this in Internet Explorer Tools -> Internet Options -> General -> Temporary Internet Files, Settings...

Defragmenting Your Drive

The next thing you can do is make sure your hard drive is properly defragmented. (Is your disk defragmenter broken? How to fix). File fragmentation occurs continuously while using your computer. What it means is that the files are not in one piece, they are split up and spread around your hard drive, thus when you go to read them, it takes longer to find all those pieces, than if the file was all in one place.

The built in Windows defrag program works well. You should run the defragmentation routine about once a month, or more if you use your computer heavily. The problem with the built in defragmenter is that it will not defragment system files that are open, like the paging file.

Sysinternals makes a program that defrags the system files at boot time, download from here. Unzip the program somewhere, then run it and set to defrag at next boot. This will defragment your paging file and other system files at boot time, before they are opened by Windows XP.

PassMark Fragger is software tool that lets you fragment or defragment existing files in a controlled environment using user-selected settings and is available for XP, Vista, Win7, Windows 8, Server 2003 and Server 2008. Free for personal use download here.

Hard Drive Temperature

Now that we have your hard drive purring away nicely, you may want to check how hot it is getting. DiskAlarm makes a program that monitors your hard drive temperatures. This is totally dependant on your hardware being able to provide this information. You can download a free program that checks your temperature and produced a dialog as shown above. It does nothing else, if you want it to continuously monitor the temperature and give alarms etc, you need to buy the full version.

Most desktop Hard Drives are rated to about 57c working temperature, so if your hard drive is over this, you need to do some work on your system cooling.

           SMART Hard Drive Meters

S.M.A.R.T.
 (Self-Monitoring, Analysis and Reporting Technology; often written as SMART) is a monitoring system for computer hard disk drives to detect and report on various indicators of reliability, in the hope of anticipating failures. Download a free for personal use PassMark DiskCheckup ™ utility here

CPU Temperature

Another issue if you hard drives are failing or you computer is freezing allot and hanging with the blue screen of death is internal temperature of the computer. Many times I have seen clients computers clogged and filthy dirty with dust. This free utility might be able to help.

 Essential Updates

Do make sure you keep your computer up to date using Windows Update, new exploits occur all the time, and there is always someone in the big bad world wanting to cause you a little grief, if you do not have Service Pack 1 on your XP machine yet, check out my XP exploit page for an example of what can be done.



Windows XP Specifics

The above tips apply to all versions of Windows, following are a few tips for XP only.

System Restore

Microsoft has included a feature in XP that takes periodic snapshots of your essential system files and configuration. The theory is, if you have a problem, you can restore your system to a previous state. Sounds nice, it even works, but the problem is that Windows uses huge amounts of your hard drive to save restore information from the day dot.


Even on it's lowest setting it is still using 200 MB, which gives me about 10 days worth of restore points, more than enough for me.
You can set it to whatever you feel most comfortable with, just pull the slider and find a point you like for safety and disk usage.
To set this right click My Computer -> Properties -> System Restore -> Select a Drive, Settings...
Adjust each of your hard drive to suit. Your system drive will have a much higher usage on minimum than your other hard drives, because of all the system files on it.

ClearType

XP includes ClearType. This is a method of sharpening up text on your LCD monitor, by using the different colours on the screen separately. It works like magic, makes the screen much easier to look at. Even though it works because of the physical layout of an LCD screen, you may like the look of it on a standard CRT monitor too.
To enable, right click your desktop -> Properties -> Appearance -> Effects... and enable the smooth edges of screen fonts box, use Cleartype
To get the best out of ClearType, you have to fine tune it, you cannot do this from Windows itself, but only online on Microsoft's web site here. Go through the tuning wizard and select what looks best for you. I selected the bottom left option.



If you have come up through the various Windows 9X OS's, you may wonder what happened to the boot time recovery options, I know I did. This is where Windows used to say Press F8 for Advanced Recovery Options. This option is still there, but it only shows for a small amount of time (too small to display on a lot of computers), if you need it, press F8 just before the first black Windows XP boot screen.