2015-10-25

Code Formatter for HTML pages

Use this screen to generate html-compatible code-blocks -- blocks of code with indents that don't get compressed on an html page.  Paste results as html code into your editor.

This program was originally from codeformatter.blogspot.com and has been modified with additional features and bug fixes.



Formatting Options
Convert Tabs to Spaces :
Box Fill Color :
Box Line Style :
Box Line Thickness :
Line Height :
Line Code Numbering :
Code Block Width :
Code Block Height :
Embed Styles :
Alternating Line Shading :
Remove blank lines :
Optional Top Caption :
Paste Source Source Code Here
Result Code (copy this)
Draft Preview (not accurate on this page but looks great on yours)

2015-10-13

Windows 10 - Booting into Safe Mode

Booting into Safe Mode, Windows 10

Booting into Safe Mode is easier and harder in the newer versions of Windows.  In the past, you had to power on the PC and repeatedly press the F8 key right after the BIOS splash -- and hope you pressed the key at the magic time. 

Now, choose one of these two methods:

Method 1:

1. Cold-boot the PC.

2.  Immediately after the BIOS splash screen (if displayed), but before the Windows splash, press and hold the F8 key. 

Method 2:

1.  From a booted PC, press and hold the Shift key.

2.  Click "Start, Power, Restart"

3.  Once in the Recovery Environment, select "Troubleshoot", then "Advanced Options".
     From the Startup Settings, select Restart

Upon restarting, you will see a list of options.  Choose F5 (option 5) for Safe Mode.

Windows 10 Activation

Quick Notes on Windows 10 Activation



Check the Status of your Activation:

From File Explorer, other-mouse-click "This PC" (formerly My Computer), select "Properties".  Note the Windows Activation status near the bottom of the panel.  Look for "Windows is Activated".

If Windows is not activated, and assuming you installed the correct upgrade version, Home vs Professional, 64-bit vs 32-bit (gosh no!), wait a few days.  By most reports, the machine will re-activate itself.  Agreed there is not much solace in having to wait before you install all of your apps and data.

If prompted for a Product Activation Key (Product Key) during the install, always click Skip/do later.  Neither a Windows 7, 8 or 10 product key will work in this installation box.

Doing a Clean Install

Unless you have purchased a copy of Windows 10, and you have a Windows 10 Product Key, you cannot wipe the disk and do a fresh/clean install without first running an in-place upgrade.  In other words, to get the free upgrade, you first must allow Windows 10 to upgrade from your Windows 7 or 8 machine to 10.  After that, you can download the Windows 10 Media Creation tool and do a fresh install, wiping the disk and starting over.  Just be sure the in place upgrade fully activates before doing the second install.  In all cases, skip any Product License key screens.

Still have Activation Problems?

Engage the licensing utility with Start, Run "slui.exe 4"  (no quotes) and follow the prompts.

Want to talk to a human for Activation Problems?  Search Microsoft.com for "Microsoft Volume Licensing Activation Centers Worldwide telephone numbers".  You will need your Windows 7/8 Product Key.

http://microsoft.com/en-us/licensing/existing-customer/activation-centers.aspx

2015-09-19

How to install a Windows driver INF file

How to install a Windows driver INF file

Some Windows drivers are downloaded with SETUP.exe's, but others are simpler, and arrive in a ZIP file, with manually-installable INF files. The contents of the ZIP will usually show several files, including some SYS files, and an INF file.  It is the INF that needs to be installed, but it cannot be installed while still housed within the ZIP. 

Double-clicking the ZIP file gives the illusion it has been opened, but File Explorer shows the contents, even allowing you to tunnel, but it has not yet been de-compressed.  Follow these steps to expand the files within the ZIP.

1.  Set Windows Explorer to show file extensions, this way you can easily identify the INF file.

From File Explorer, [View] ribbon, select "File Name Extensions"


2.  Highlight the downloaded ZIP file.  In the Ribbon-bar (Windows 8), note the top-tab [Compressed Folder Tools], click button "Extract All".  Using the default-prompt, it will create a new folder, next to the ZIP, of the same name.  Allow it to extract.

Older versions of Windows, or as an alternative in Windows 8, 10:  Double-click the ZIP to view the contents.  Click the first file or folder in the list.  Press Ctrl-A to highlight all contents.  Other-mouse-click, choose COPY.  Paste into a different folder, or a new folder, at least one layer higher up in the tree-diagram.  This will be the expanded files.

3.  Open the newly-created folder (not the ZIP file).  Locate the INF.  "Other-mouse-click" the INF, choose "Install" from the Context menu.

Some ZIP files may contain multiple folders, for multiple drivers and they may contain separate INF files.  Although not difficult, it is a nuisance to figure this stuff out.  Ideally,, the vendor would provide a SETUP.exe to automate these processes.

2015-09-14

Yahoo is a swindler

Yahoo Search is dishonest and has sold you out. 
Or, "How to tell if your downloaded software is legitimate or not."
Here is your chance to learn from my mistakes.


I needed to install the Foxit PDF Reader.  One would think it would be easy to find the download, but Yahoo went out of its way to make this unsavory.  Without scruples, they guided me to the third-most dishonest site on the web (I am sure there are worse places).  Let me explain.


Searching for "Foxit Reader" brought this result:


This is an ad, which at first I did not notice.

More importantly, notice the site:  DownloadDF.com, which opens to this legitimate-looking page. On the surface, I thought this was Foxit.  They must be using a third party to host their downloads (www.downloaddf.com/foxitreader).  In retrospect, this is an odd thought; Foxit is big enough to have their own site.... 



I clicked download....




The .exe name seems legitimate, "Foxit Reader Setup.exe".  Notice the publisher -- "darwendlmtowerworld.com" -- not "Foxit."  Like most people, I clicked "Save File" and continued on my way.


The Last Defense:

Running the executable produces this message in Windows 10 (another good reason to upgrade from Windows 7).  The App is "Foxit Reader Setup.exe" by "Funnel Superb (Fried Cookie Ltd.)"  Fried Cookie Limited?  Are you kidding?



I won't bore you with the actual install.

It installs five other toolbars, spyware programs and "sharing" programs. By the time you are done, your machine will be so infested with crap,you will be lucky if the machine runs.

Technically, the install might be legal, but it is certainly immoral.  For each of the 5 spyware programs being installed, you are being prompted to accept or decline -- that makes it legal.  But each program used a different method to opt-out.  Some used a radio-button with a popup-checkbox to un-click, others used a backwards-worded "do you want to decline this install", etc.  It was confusing, and difficult.  This does not pass the "Mom test".

Everything about this install was flaky.  I bailed before the final "Ok" and I still feel dirty.  I am now scanning for viruses.


Yahoo?  Why???

Yahoo accepted money to make this the top result.
The next five results are similar.  None of the top five results are legitimate. 

Contrast this with Google's top 3 results, where the legitimate site was returned.  Bing behaved similarly: 




Yahoo is dishonest and disingenuous.  This is disgraceful.

My internal alarm bells started ringing after the second or third hint, but I was well into the process before I understood what was happening.  I did not realize my mistake until the final Windows 10 prompt.  Most people would blow past these messages and it would be hell.  You cannot trust people.


You wonder why Windows machines get a bad rap for getting viruses.... When you click "Yes," it is often self-inflicted.


What Should You Do?

Always download programs directly from the publisher's site,
Never from a third-party site, such as SourceForge or DownloadDF.

For example, Foxit Reader can be found at
https://www.foxitsoftware.com/products/pdf-reader/

Use Search to find the site, but once there, do a little poking around to see if the site you arrived at is actually the publisher's site.  Watch the URL's.  This can be tricky.  Finding these sites can sometimes be a challenge, especially if you are using Yahoo.

Pay attention to the publisher's name.
When running the exe, look at the publisher's name.  Be suspicious if different.  In this example, the publisher was "darwendlmtowerworld.com" -- they are not your most honest citizen.



Hesitate when Windows displays the UAC nag
-- especially if it is Windows SmartScreen.  Granted, Microsoft will almost always display this prompt when ever you run an executable.  Stop and study the message.  If it seems fishy, it is.



Pay attention to the options.  Always choose the Advanced Install.

Options often include "optional" or "recommended" software, such as Search Toolbars (such as Ask.com), or virus scanning software, such as the evil Mcafee Security Scan Plus.  Do not install the options.  Ever.


Most importantly: Change your browser's default Search Provider.
I am biased.  Make Google the default, or perhaps Bing.  Remove Yahoo, Amazon, and all others.  How to do this depends on your browser.
 
It is too bad Mozilla decided to use Yahoo; I guess they needed the money...  You will have to go out-of-your-way to make this change.  It is worth it.



Related Articles and Links

Foxit Reader can be found at
https://www.foxitsoftware.com/products/pdf-reader/

How to install Foxit Reader
http://keyliner.blogspot.com/2015/07/time-to-uninstall-acrobat-reader-and.html

Scanning for Viruses - Keyliner Recommended Steps:
http://keyliner.blogspot.com/2015/07/virus-cleanup-steps.html

2015-08-08

Office 2013 Custom Install - Administrative install - Install Options

How to install Office 2013 HUP with selected options
How to install Office 2013 using advanced install or /Admin options
How to install Office 2013 using advanced options instead of the Click-to-Run options
How to install Office 2013 to the D: drive, to a different drive, to an SSD drive
How to uninstall selected options or programs in Office 2013

Issue:
Office 2013 (Home, non-corporate editions, "HUP") editions do not have any options when installing.  You cannot chose which drive to install to; you cannot chose which options to install. You are forced to install all of the office suite, including Powerpoint, Lync, Outlook, Clipart, additional fonts. Using Add-Remove Programs, Change, only allows a repair.  You cannot install or change selected options.

Unclear why Microsoft decided on this installation method. In any case, here is the somewhat painful and stupid solution.


Solution:

1.  Uninstall previous Office 2013

2.  Download Office 2013 Free Trial from Microsoft.com

Download the trial version that matches your disk.  For example, my disk came from an employee office purchase (commonly called "HUP") and was for Office 2013 Home-Professional Edition. As of 2015.08: 
https://www.microsoft.com/en-us/evalcenter/evaluate-office-professional-plus-2013?i=1

or search Microsoft.com for Technet Evaluation Center or search "trial downloads".

Download either the 32-bit or 64-bit version.
I recommend the 32-bit version, even if 64-bit Windows.

Login using your Microsoft.com account.  Likely, you already have the account and this would be the same account you use to login to your Windows 8 or Windows 10 desktop  (the original account, not the Windows 10 PIN).

Before starting the download, you will have to take a short registration survey.  This is minor.  Follow the on-screen prompts.



3.  Burn the downloaded .IMG file to a DVD

a.  Locate the downloaded .img file.  As of 2015.08 "OfficeProfessionalPlus_x86_en-us.img"

b.  With File Explorer, "other-mouse-click" the .img, chose "burn to disk"


4.  From the new DVD, run Setup.exe.  Chose your installation options


5.  For the Registration Code, use the same Microsoft number used with your original Office installation disk.


Other solutions suggested on the Web will not work:

Especially if you are using a HUP install (from your office), these often suggested ideas will not work....
*  From Add-Remove Programs, choose "Change"  (only offers to Repair)
*  setup.exe /admin   (cannot be used with a non-enterprise disks)
*  Office Customization Tool (OCT) (cannot be used with non-enterprise disks)
*  Editing the Config .xml file  (not available with the Home or HUB install)
*  Copying the CD to a local drive, then running Setup /admin  (fails for reasons above)

Every time Microsoft dumbs-down an install, it is frustrating.  I spent about 4 hours reading and trying options before this one was found.

Your comments welcome.

2015-08-05

Windows 10 problem - Partitions are not in the recommended order

Windows 10/11 installation problem: "The partitions on the disk selected for installation are not in the recommended order.  For additional information about installing to GPT disks...."


Symptoms:
You are doing a fresh install, from a Windows 10/11 ISO image, or are installing Windows to an existing hard disk that had a previously-installed operating system.

You have selected the (largest) available partition to install, likely the same partition Windows 7, or 10 was installed.  Other partitions, such as an ESP partition, are ordered earlier in the list. 






2021.11:  Windows 11 Upgrade
----------------------------------------------------
Author's notes: 
Do not use these steps when upgrading (an in-place upgrade) from Windows 10 to Windows 11. 
Backup all data before doing these steps.



Solution 1
(not recommended, but easy)


A.  During the installation, select the previous Windows 7/8 partition and ignore the error.  Windows will install properly, even with the error.  However, this is not recommended, leaving old partitions and wasting disk space.


Solution 2 (recommended)

Older versions of Windows included a basic partition utility, exposed during the installation steps.  With this utility you could delete partitions and consolidate the disk, as well as other functions.  But with Windows 10/11, Microsoft chose to hide the utility - right at the time you needed it most.

Fortunately, there is an easy, albeit geeky solution.  A hidden DOS utility can delete the disk's partitions during Windows 10/11 Setup. 

Obvious caution:  This will erase all partitions, destroying all data, files and partitions.


1. Start the Windows 10/11 install ("Install Now").

Typically choose "I do not have a product key" (which is the normal choice for all Windows 10 non-Enterprise upgrades/installs).

After accepting the license agreement, choose "Advanced Installation".

2.  At the Windows 10/11 "Setup Partition Screen" (where it shows the C: drive),

Press Shift-F10
This opens a DOS prompt
Some laptops use:  fn-Shift-F10  (function)


3.  Type this command:  "diskpart"  (no quotes)

4.  Type "List Disk".

Note which disk is your largest.  This is likely the one where your existing operating system is installed.  For most, DISK 0 is the disk you care about.  


If you have SD card slots, they will also show in the list; ignore them.
DVD drives may appear as "no media" or with a size (4G?); also ignore.

5.  Type "Select Disk=0"  to activate your disk.

6.  Type "List Partition"  (singular, not "partitions")

-- You could compare the following list with the Windows Setup screen and my disk looks like this illustration.  In this case, some of the partitions were from Windows 8. When Windows 10 upgraded, it adds its own new partitions rather than risk damaging the older ones.  The space occupied by these is negligible but would be wasted:



7.  Type "Clean"

One command does it all.  There is no warning. It will run for a few seconds.  
Results: "DiskPart succeeded in cleaning the disk."

8.  Type "List Partition"  (singular)

- expected results: "There are no partitions on this disk to show"

9.  Type "exit", closing DiskPart
10. Type "exit", closing the command window


This returns to the already-in-progress Windows 10 setup, where the old partitions still show.
Continue with these steps:

11.  Click "Refresh"  

-Note:  Drive 0 shows all as "un-allocated space" - all on one partition.

12.  Click "*new",  then "Apply," accepting the recommended disk size. 

(Special note: If you are installing a new SSD drive *and* are cloning an existing Windows disk, look at this article, which recommends holding back 10% of the disk partition for an Over Provision partition.  See this keyliner article:  Crucial 500GB MX300 Enable Over Provision Partition.  If you are re-installing Windows from scratch, continue with this article.)

13.  At the prompt, "To ensure Windows features work correctly, Windows might create additional partitions."  Click OK

Continue with your Windows install


Benefits of the recommended solution

By cleaning the drive, all partitions are cleared, freeing the space.  Vendor recovery images that will never be used, prior versions of Windows utility partitions (now obsolete), and other vendor utilities are all combined into the main drive.  The gained disk space results in a simpler partition table with less overhead.  As Windows installs, it will build its own partitions, and these will be in the recommended order for all eternity.

Drawback to the recommended solution

Most PC's come with a hidden partition containing an emergency recovery image, which can restore the PC to a factory image.  The steps above destroy that partition.  My experience is these partitions seldom work, or you need to spin them to a DVD before using.  Few bothered. 

In Windows 10 and 11, recovery disks are not useful.  Instead, download Microsoft's Windows installation ISO (The Windows "Media Creation Tool" - you are probably running that install right now).  The rebuild will work because the PC has already registered with Microsoft and it will automatically recover and re-license itself.  

Once rebuilt, return to your motherboard vendor's support page (Dell, Lenovo, Asus, etc.) and download the most current drivers.  This is better than an already obsolete recovery partition.  In other words, you no longer need HP's or Dell's recovery disk.

-end

During your original Windows Install, before attempting these steps:  If you get a 0x000000 error, it means you trashed your UEFI disk-encryption. 

To recover, I went into the motherboards BIOS.  In the BIOS, use a menu/feature to wipe the drive and start over.  Not all BIOSs have this ability.  

On a second machine, I had the chance to play with this again.  This time I let Windows do an "in-place" upgrade -- which is not a clean install.  Once Windows 11 installed, I then used "Reset this PC" to do a fresh re-install.  This preserved the UEFI, but meant installing Windows 11 twice, once for the in-place upgrade and a second for the clean-install.  This extra step only took a few extra minutes. 

During the second install, and as expected, I was prompted:  "A configuration change was requested to clear this computer's TPM.  This was expected.  Press F12 to clear the TPM and continue.

Finally, I am sure the steps in this article would work with a Windows 11 re-install (once Win 11 is properly installed at least one-time).


Related Articles:
keyliner:   Crucial 500GB MX300 Enable Over Provision Partition
keyliner: Erasing all partitions after a Clone and Formatting
keyliner: Best Virus scanner

Related links:
Microsoft.com Windows 10 Media Creation Tool
https://www.microsoft.com/en-us/software-download/windows10/



Windows 10: Unsupported video configuration detected

Windows 10 error - Unsupported video configuration detected.  Action is required.  This computer has an add-in graphics card, but the monitor cable is plugged into the integrated video connector...

Issue:
You connected the monitor to the onboard video port, bypassing a third-party video card (e.g. NVidia, etc.), and began the Windows 10 install.  You did this in order to see the BIOS setup screens to change the boot order.  See Keyliner article:  Black or Hung BIOS Setup Screen XPS 8700

Solution:
1.  Power off the computer, as instructed on the error

2.  Chose one of these options or the other:

a.  Physically remove the third-party video card and keep the Display Port or Onboard Video
b.  Or disconnect the onboard video cable and only use the third-party video card

Middle of a Windows 10 Install?

If you were in the middle of a Windows 10 installation, boot the computer.  At the "Press any key to boot from CD" -- do nothing... wait.  Allow the computer to boot from the hard drive and the Windows install will continue from before the error.

If you allow Windows 10 to finish the install using the onboard video, wait for a finished desktop to appear.  Then, power-down the computer and re-install the third-party video.  Detatch the onboard video cable.  Reboot.  Then install the (NVidia or third-party video drivers).  If found this to be difficult and frustrating process.  Unfortunately, I did not record the exact steps.


Black or hung BIOS Setup Menu on Dell XPS 8700

How To article: Entering BIOS Setup on a Dell XPS 8700, and other Dell models.
Screen black when booting, cannot find the BIOS setup menu
F2 / F12 BIOS setup menu not visible when booting
PC Hangs if F2 pressed

You are likely trying to change the BIOS boot order, moving the CD/DVD (ODD) or USB to the first boot position.

Symptoms:
Pressing F2 to enter BIOS setup does not appear to work
Pressing F12 to enter the Boot Order menu does not appear to work
Computer seems to hang after F2 is pressed; no screen activity
You have a DVI-attatched monitor, connected to a third-party video card (NVidia, and possibly other brands)

Issue:
I believe the monitor enters into a power-save mode and does not display video signals, or the monitor does not respond to the hardware / bios splash screens.  This appears to be a bug in the hardware and is because of a third-party video card (NVidia?).

Solution:
I could not find a good solution for this problem, but did find a workaround.
Physically remove the third party video card.  Use the motherboard's onboard Video instead.  With the XPS 8700, this means using the Display Port video port. Hopefully, you have a Display Port-capable monitor...

If you have a DVI port built into the system, continue with that setup, just be sure you are using the on-board port.

Steps:

1.  Open the PC and remove the external third-party video card.   (Don't forget the video card has a plastic catch at the end of the card slot, which must be released to remove the card.)

2.  Plug a Display Port cable (looks similar to an HDMI cable, but different) into the computer and monitor.  Or, if you have DVI/VGA, plug the monitor into the system's built-in port.

3.  Cold-boot the computer, pressing F2 at the hardware banner screen.  This will get you into the BIOS setup screens.


After making your BIOS changes, return the video card to the system, and disconnect the Display Port cable.  If you continue installing or booting into Windows 10, you will get this message if both the Onboard and third-party video ports are active at the same time:

Windows 10 error - Unsupported video configuration detected.  Action is required.  This computer has an add-in graphics card, but the monitor cable is plugged into the integrated video connector...

2015-07-16

PSExec - Access is denied

Solution: PSExec - Access is denied

Symptoms:
Using Microsoft Powertool "PSExec" to execute a program on a remote server. This message is displayed on the source computer: Access is denied

Solution:
On the Remote (destination) server or workstation, the calling credentials must be in that machine's Administrator's group.

1.  On the remote server, see Windows Control Panel, Administrative Tools, Computer Management

2.  Still on the remote server, in Computer Management, under Users and Groups, add the userID to the Administrator's Group.  This is the source-machine's User-ID/Credentials (the machine launching PSExec).

On the remote server,
You do not need to build Shares, but they are handy to shrink path-lengths
You do not need to grant the remote ID "Execute" rights within the share
You do not need to worry about turning on File Sharing
Do not bother installing PSExec on the remote machine

This is regardless of whether -u and -p parameters are used.  Because the user is in the Administrator's group, it gets all of these rights, regardless.  To my knowledge, you cannot bypass the Administrator requirement.


Discussion:
The local PSExec temporarily installs a service at the remote machine and because it is building a new service "on-the-fly," it needs to have Administrative rights.  Because you have to grant Administrative rights, the elevated privileges trump all other rights.

The program literally copies a file, psexecsvc to the remote server's Admin$ share and starts the service on that device.  When the command completes, the service is de-installed.



Other helpful hints:

*  On the Source computer, copy PSExec.exe into C:\Windows\System32 so it will be on the path
*  On the Source computer, launch PSExec.exe with no parameters at least one time to approve the Legal-accept screen

Example, as typed on the Source machine:

psexec.exe  \\RemoteServerName  \\RemoteServerName\Share\Path\program.exe
psexec.exe  \\RemoteServerName  "C:\Program Files (x86)\program.exe"  param-1  param-2
psexec.exe -acceptULA \\RemoteServerName  "C:\Program......"  (etc.)

Different credentials can be used.  Naturally, this account must be defined in AD or as a local account on the remote server:

psexec.exe -u myaccountname -p mypassword   \\RemoteServerName  "C:\Program....."  (etc.)

use psexec.exe /? for additional help and parameters.


What is PSExec:

This is a tool developed by the talented Mark Russinovich, now of Microsoft, that allows system administrators to execute programs on a remote computer, without having to have direct control of the desktop or without using a remote console.  This is also known as Windows SysInternals or formerly "power toys".  The "ps" refers to similar Unix system commands.

When the remote program runs, it runs *on* the remote computer -- not from the calling computer. 

For example, this command retrieves the ipconfig.exe program from the remote computer and runs it on your local CPU -- giving you your machine's IP configuration -- probably not what you wanted.

\\RemoteServerName\Share\ipconfig.exe

while: 
psexec.exe  \\RemoteServerName  "ipconfig.exe"

runs on the remote server, getting the remote server's IP Config information and displays the results on your local computer.

Downloading PSExec

Download the program directly from Microsoft as a ZIP file.  An install is not required. 

From www.Microsoft.com, search for "PSTools" or "PSExec". 
Download the ZIP file.  
Open the ZIP and copy PSExec to C:\Windows\System32 or another directory of your choice. 
An install is not required.

It is helpful to have this program on the local workstation's path.  You do not need to install the program on the remote servers.


2015-07-01

Virus Cleanup Steps

How To: Virus Cleanup steps for Windows PC's.  Generals steps that work for almost all infections.

Over the years I have written many articles on how to cleanup specific viruses but the articles become dated and are less useful when other viruses take their place.  This article generalizes the steps I take for all infections.  Although time-consuming, the results are almost always good.

When cleaning viruses, it is best to boot from a non-infected virus-cleaning disk -- usually a bootable CD.  Because you are booting from a guaranteed, non-infected operating system, and because it has full-control of the hard drive, there are no locked or in-use files and the software gets complete access to the disk.  Because of this, it can clean the most stubborn infections

Microsoft and other vendors now have free, bootable CD's.  To do the job right, you will have to run multiple products, from multiple vendors.  This will take time. 



In General:

Build the bootable CD's from a non-infected machine
You will be building multiple CD's, from multiple vendors
You can build bootable CD's or bootable USB sticks; I prefer CD's
Build the disks on the day they are needed -- they become obsolete within a few days

Important: If you have a laptop, running Windows 8.x or 10.x, see below for concerns about UEFI disks***.


Build the CD's

From a non-infected computer

Download Windows Defender Offline

This is a bootable CD* that runs Microsoft's virus cleaning utility.
http://windows.microsoft.com/en-us/windows/what-is-windows-defender-offline


- You must use Microsoft's Internet Explorer to download
- Always download and use the latest version
- It will download a stub program, msstools.exe.  Run this stub.
- It will build the CD automatically; follow the on-screen prompts or see the steps below.
- Most Windows 8, 7 and Vista users should choose the 64-bit version.


Download Kaspersky Rescue Disk

This is a bootable CD that is downloaded as an .iso file.  Use the .iso to build the CD


http://support.kaspersky.com/us/viruses/rescuedisk#downloads
Click "Distributive" to download the ISO

- Click the Download Kaspersky Rescue Disk link.
- This will write an ISO file, which is a CD disk image.
- From Windows 7, 8 or 10, follow these steps to write the ISO file to a CD.


Download AVG Rescue CD

This may be overkill, but a third vendor may find things that the others miss.
 http://www.avg.com/us-en/avg-rescue-cd

- Click the AVG Rescue CD Free Download link; download the ISO version.
- See these keyliner steps to write the ISO file to a CD.



Begin the Cleanup

Once the Bootable CD's have been built and labeled, do the following:


0.  Malware Bytes

If your machine is healthy enough to run other software, from the infected machine, download and run this program, from MalwareBytes.org.  This is my favorite anti-virus program.
https://www.malwarebytes.org/mwb-download/

If the machine is not healthy enough, download the installation from another computer and burn it to a CD.  Then, disconnect the network cable from your infected computer, or disable the Wireless.  Then run this program; it will probably succeed.  Because it is not on the wire, it won't be able to update its definition files; cancel the update and let it run a full-scan with the version you downloaded. 

- Select the Free Download
- Decline the offer to install the 30-day trial
- If possible, allow the program to update its definition / dictionary files
- Allow the program to do a full-system scan
- It will take hours to run.  It runs unattended

Once it is complete, continue with the next bootable CD

If you cannot get MalwareBytes to install or run, continue with the next CD.


1.  Kaspersky First

Have your network cable plugged in or your wireless enabled.  Boot the computer with this CD and follow the on-screen prompts.

- Insert the Kaspersky CD into your drive and boot the computer.
- Hopefully, you are prompted "Press any key to boot from the CD"
- If you do not see this prompt, see below on how to change your BIOS boot Order**

Allow the program to do a full-system scan.  The program is a little weird.  Click the big red (or green) button in the upper-left corner to begin the process.  On the current version as of this writing, the button looks like a bunch of LED' in a circle and it is not clear this is a button.

The scan will take hours and can run unattended.


2.  MSE Second

Boot the Microsoft CD and instruct it to do a full (not quick) scan.


3.  AVG - Optionally Third

Consider booting the AVG disk if you want to be even more thorough.  Personally, I have not actually done this, but if you have the time, it is worth the effort.  It may find something the others missed.


4.  Last Step

If you were unable to run MalwareBytes in Step 0, allow the computer to boot normally (without a bootable CD).  Install MalwareBytes and allow it to run.


In my experience, these steps have almost always fixed the computer, with one notable exception.

RANSOMWARE Viruses

If you detect a Ransomware virus, the programs above will remove the virus but they will not be able to save the data and many programs.  It will render your computer useless.  It is repairable, but your data will be lost. 

(Ransom viruses encrypt all of your data files, such as Word, WordPerfect, Excel, PPT, photos, etc., and invite you to pay a fee of $100-$500 for the decryption key.  The fee is usually paid in bitcoins, which are untraceable.  Under no circumstances should you pay.  To begin, they will take your money and may not give a decryption key.  They may give the key, which will restore your data files, but will like re-encrypt in the future and charge ransom again.  This is truly a lost-cause.)

The only way I have found to 'recover' from this type of attack is to build your system recovery CD's (from your hardware vendor - usually a menu to build "recovery disks", or contact the vendor to have one shipped), format the hard disk and start over.  This will save the hardware, but all data will be lost.  Recover data from your backups.

Other Notes:

**BIOS Boot Order

Your PC may not allow booting from a CD.  Follow these rough steps, which vary by each computer model.

A.  Cold boot the PC
B.  At the hardware banner screen, press F10, or F12 or F2, to enter the BIOS Setup or Boot Setup menu.  Sadly, this varies.
C.  If you arrive at at UEFI Secure Boot screen, see the note below* before going further
D.  Enter the BIOS Setup (sometimes called simply "Setup").
E.  In the top BOOT menu, look for a choice that shows boot order.  Arrange the order so the CD is first to boot, then the Hard Disk.
F.  Most BIOS screens use a bottom-menu F10 to SAVE your changes.
G. Allow the PC to reboot.  Watch the screen for a Press any key to boot from CD


***UEFI Disks

Very new laptops, with Windows 8.x or 10.x have a UEFI encryption, which prevents viruses from writing boot-sector changes.  Unfortunately, this also blocks bootable CD's from seeing the disk (UEFI is actually a very good security feature -- it just stops some of these tools).  If your vendor has signed drivers, they can boot, but as of this writing, I have not found a vendor who can do this.

For example, if you have a UEFI disk, Microsoft's MSE claims to be able to boot and clean the disk, but I have not yet got this to work.  I am still researching this.

If you have a UEFI disk, I do not know how to use these bootable CD's.  Your only hope will be MalwareBytes.

Your comments are welcome.

2015-06-27

Burn ISO Image menu missing from Windows

Problem:  The "Burn ISO Image" menu is missing from File Explorer's context menu.  This article describes the solution.

To burn an ISO file to disk, follow these normal steps:

A.  With File Explorer, locate the .ISO file.
B.  "Other mouse click" the file, choose "Burn disk image". 




If the menu, "Burn Disk Image" is missing, another program has taken control of the ISO file extension.  Use these steps to return control to the default settings.

These steps work for Windows 7 and above:

1.  Open the Windows Control Panel
 
2.  In the Programs category, click "Default Programs"
 
3.  Click "Set your default programs"
 
4.  In the left-nav, select "Windows Disk Image Burner"
 
5.  On the bottom, click "Set this program as default"

This sets the Windows program
"Windows Disk Image Burner"  (C:\Windows\System32\isoBurn.exe)
as the default program for ISO and IMG files.

Why is the menu missing?  Likely, another CD-burner (such as Nero, Roxio, or other CD software provided by your hardware manufacturer) intercepted the menu.

Related documents:
Keyliner: Burning an ISO Image in Windows - Step-by-step with other hints
Keyliner:  Burned Audio CD's do not play in car or stereo

2015-06-18

HDMI Cable does not broadcast sound to the Stereo Receiver

Solution: On a new TV, connected to a stereo Receiver, sound does not broadcast to the stereo.  TV sound only works through the TV's internal speakers.  This article discusses the solution.

Symptoms:
No sound is heard from an HDMI-connected TV/Stereo.
The Receiver is older than apx 2012 / 2011, the TV is new.
When the TV's internal speakers are used, sound works properly.
Other devices, such as an HDMI-connected DVD player or Game Console do play sound through the stereo.

Issue:
Even relatively new stereos may not support the "ARC" HDMI standard (Audio Return Channel - Sony branded "ASC").  ARC/ASC allows audio data to be transmitted down to the stereo, from the TV's inbound HDMI cable.

Because of this, you will have to use a secondary audio-output cable, usually an optical cable, to route sound outbound from the TV to the receiver's inbound ports.  Thus, there will be two cables running from the TV to the Receiver.  If your receiver does not have optical ports, you could reluctantly use old-style RCA jacks.


Pres-requisites:

a.  Confirm the TV is not set to Mute
 
b.  Confirm the TV's internal speaker settings are set to "Stereo" (or the non-internal speakers).  This is controlled by the TV's setup menus.
 
c.  From the Receiver's side, confirm the TV's HDMI cable is connected to the HDMI Output port (Important:  This is not a normal HDMI input port).

d.  Confirm the other end of the HDMI cable is connected to the TV's INPUT HDMI port.  On my TV, this is labeled "ARC".  Use this port even if you do not have an ARC-compatible receiver.


Solution 1:

1.  Replace the stereo with an ARC-compatible stereo receiver.  At the time this article was written, I did not try this solution, opting for solution 2.  But later, I did buy a new receiver, solving the problem.

Although expensive, there is one minor benefit:  The TV's remote will control the stereo's volume up/down.  Without this, you need one remote for the TV and a second for the stereo.  The stereo's remote will be used mainly for the volume, and little else.  You could substitute a universal remote and program-around this. 

Solution 2:

1.  Run an optical cable from the TV's optical-out port to the receiver's TV Input port.  This is what I did and I used a RocketFish branded cable.

Learning from my experience, a 4-foot (1.3M) optical cable was not long enough to comfortably reach the cabinetry directly below the TV.  Save yourself a second trip to the store and by a 6' or 8' (2M) cable.


(If you do not have an optical port, use a red-and-white RCA connection, but with this option, your equipment is probably too old and you should consider a new receiver.  You will be missing out on other HDMI benefits.)

Solution 3:

By a Sound-bar and bypass/discard the receiver.  I did not try this option.


Comments:

Most people chose a simpler design and route all equipment directly to the TV, allowing the TV to be the central hub.  I did not do this because of the cable-mess behind the TV.  Instead, I recommend routing all connections through the stereo receiver.  With this design, the TV needs  3 cables:  1 HDMI, 1 power, and unfortunately in my case, 1 optical -- a fourth cable if you are using a wired Cat-5 cable.  If I had a slightly more modern receiver, I could dump the optical.


If you find the optical cable does not work, as in my case, try a different port on the receiver.  If this still fails, consider the possibility the TV's port is bad.  Some have suggested a can of compressed air may fix bad ports.


*With an HDMI-connected DVD/BlueRay player, the very act of turning on the DVD player's power is enough to automatically switch the TV's INPUT to the DVD.  This happens even though a stereo receiver was in the middle.  How cool is that?  You may not be impressed, but just last week, I retired a 30-year-old TV with RCA connectors.  My friends have welcomed me to the modern age.

2015-06-09

Easy Disable Cellphone Crapware - Android

How to: Disable cell phone "crapware" (unneeded or unwanted programs) from your Android phone, without rooting - Easy steps, highly recommended.  Does not require software.  This article has been modified and improved, 2015.06. 
 

My AT&T (ATT) phone ships with dozens of add-on programs that I do not need or want and I am sure your phone has the same problem.  These programs run in the background, occupying memory and they pester for updates.

Short of rooting the phone, the programs cannot be uninstalled, but some can be disabled.  With these steps, many apps can be permanently disabled and the steps are reversible.  Here are the benefits:
  • They do not occupy memory
  • They will quit checking for updates
  • They will quit notifying you
  • They will not appear in the All Apps menu

Steps:
Illustrated - an HTC One M8 from AT&T, running Android 4.4.2 (and Lollipop 5.01).
Your Android phone may look different, but the steps should be similar.


1.  Open the Settings Screen, choose Apps. 
(Version Galaxy S4 shows "Application Settings")


 
2.  In the Apps screen, scroll (horizontally), changing from the "Downloaded" screen to the "Running" screen. On my phone, switch between the menus by flicking horizontally on the top ribbon-bar area. 

Note:  With Marshmellow (Android 6.x), this step is no longer needed.  Jump immediately to Step 4.

Review the Running apps; these are programs running and occupying memory.




3.  Important! 

Continue Scrolling to the "ALL" Apps screen (illustrated above).
The next steps can only be done from the ALL screen.

4.  Choose an unwanted application.

If the app allows, and many do, disable the app by:
a)  Uncheck "Show Notifications"

b)  Click Disable
c)  Click Force Stop.  It will prompt for confirmation.


(Verizon has slightly different prompts, same steps; see below)



A Verizon Galaxy S4 screen looks like this:
Verizon Galaxy Steps, in this order, for each app:
* Uncheck "Show Notifications"
* Click Turn Off
* Click Force Stop




Important notes:
  • You must be in the "All" screen to make these changes.
     
  • Choose with care which programs to disable.  Do not disable Android OS-looking apps.
     
  • Some applications cannot be stopped in this manner.  For example, HTC Blinkfeed did not allow these choices and it would not allow me to chose "Disable".  If you can't chose "Disable", it is pointless to attempt anything else; it will come back no matter what your choice.
     
  • Some applications may be chained or called by other applications and you will see this by examining the app in the "Running" applications.  Start with the master, or top-level app.  With this said, I have left the chained applications alone.  A good example would be ATT Hotspots.
     
  • These steps "Disable" the application - but sadly does not un-install.  But with these steps, at least they do not occupy system RAM and they will quit bugging you for updates.
     
I disabled these applications:

I disabled these apps because I was either offended they were installed or because I had never used them or because I could care-less about things like moving wallpapers.  Your choices may be different.

Amazon Kindle
Android Live Wallpapers
AT&T Address book
AT&T FamilyMap  (my children were horrified at the very thought)
AT&T Hotspots (never use)
AT&T Live
AT&T Locker
AT&T Mobile Locate (I use Google's service)
AT&T Navigator (I use Google Maps)
AT&T Ready2Go
Browser Bar  (what a horrible program, what a horrible idea)
Bubbles Live wallpaper
Car
City ID (a subscription service installed on all ATT and Verizon phones)
Data Dashboard Widgit
DropBox for HTC Sense
Frisbee Contacts
Famigo
Facebook
Google+ for HTC Sense
Games (W Games -- all require money.  Why can't I play snakes?)
Holo Spiral Live Wallpaper
HTC Account
HTC Recommend (wow, you can recommend your favorite app)
Internet (Browser) shipped with HTC; I use Chrome
Keeper (who wants to type a password to lookup other passwords?)
Market Feedback Agent  (I'm sure I don't want this)
Mobile Data Widgit
Mobile TV
Music Visualization Live Wallpapers  (my screen goes blank after 30 seconds...)
MyGoogleDrive (HTC)
Polaris Office 5
Phase Beam Live Wallpaper (arg!  Another live wallpaper...)
Power dashboard widgit
Ringtone Trimmer
Twitter for HTC Sense
Uber
Wifi Hotspot Widgit
Wallet
YP (Yip)
Zoe

Anything that you stop, can be restarted by reversing the steps and then rebooting the phone (many of these are services).


Dear AT and T,
Please let me uninstall this stuff.  It makes me so angry that I have to fight this and all I want is control.  A Google Nexus phone is looking better and better.
 

2015-03-20

Disable Cursor and Menu Animations in Office 2013

Disable cursor and menu animations in Office 2013
Slow scrolling in Excel 2013
Slow cursor positioning in Excel 2013 (Office 2013)

Issue:
In Office 2013, when clicking cells, typing, scrolling, selecting menus, etc., especially in Excel and Word, it now uses animation to give the movement to the action.  For most of us, it "feels" intolerably slow.

Solution
:
Microsoft did not expose an option for disabling this feature.  Use the Registry Editor to correct.  If you have never worked in the Windows Registry, do not panic; the steps are easy.

1.  Run "RegEdit"  (the Windows Registry Editor)

  Steps:
- From the Windows 8 tile menu, click anywhere on the background
  or from the Windows 7 Start Menu, press and hold the Windows key-R (for "Run")

- Type the word "Regedit" (press Enter)  e.g. Start, Run "Regedit"


2.  On the left-side tree diagram, scroll to this location, expanding folders, as needed.

HKey_Current_User\Software\Microsoft\Office\15.0\Common

Steps:
a.  In the Registry Editor's left-nav, scroll down the tree, opening these folders by clicking the "triangle" next to each folder:
 
HKey_Current_User
Software
Microsoft
Office
15.0
Common

b.  Highlight (single-click) the "Common" folder.
"other-mouse-click" the highlighted Common folder, choose  "New, Key"

Click all images for a larger size
c.  In the new Key name field (see new folder on left-nav), type "Graphics"  (case-sensitive).  You are renaming the "New Key #1" field.  Press Enter to accept the new key-name.


3.  Look to the right side of the program.  In the newly-built Graphics folder, which is empty except for a "default" value, activate the right-side of the panel by clicking once on a blank area (the detail side of the panel).

- In the detail pane, "other-mouse-click" a blank area on the panel,
- Choose "New", "DWord (32-bit) Value"

- Name the new value "DisableAnimations" (case-sensitive, no spaces).  Press Enter



- When prompted, assign "DisableAnimations" a value of 1 (hex).  Click OK to save.
If you are not prompted, double-click the new DWord value:


4.  Close the Registry Editor.  Changes take effect immediately.

Notes:
This value is set per-user.  Multiple users (or roaming users), who login to the Windows Computer, will each need to make this change. This change will not work if applied to HKLM.


Here is the Registry Merge file, if you are so inclined:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Graphics]
"DisableAnimations"=dword:00000001


Many sites on the web recommend turning off all Windows (8) animation, using
My Computer, Desktop, Properties, Advanced System Settings, Performance, and disabling "Animate controls and elements inside Windows".  This would be a mistake, disabling all animation, everywhere in Windows.  If you just wanted to target office, this document is a better solution.

Related articles:
Stop Excel Active Hyperlinks
Excel User Defined Functions - very cool
Excel VLookups - Comprehensive How-to
Excel - Parse City-state-Zip




2015-03-04

Documentation - CityStateZip Public Functions

The Keyliner class Library "cl801_CityState" will parse any City-State-Zip field and return its constituent parts.  This post describes the public methods and is meant for reference

See this article for a complete description of the class library, with download instructions
Keyliner: City-State-Zip DLL - Reliably Parse CSZ Fields


Example Standard City-State-Zip:
Salt Lake City UTAH 84101 1234

Returned Constituent parts:
City:    Salt Lake City
State:   UT

ZipCode: 84101-1234
Zip5:    84101

Zip4:    1234

or Return a fully-assembled and re-punctuated CSZ:
Salt Lake City, UT 84101-1234


For documentation, these are the public methods in the class library.

Class Library (DLL) "cl801_CityState"


Public Methods


About
public string ns801CityState_About()
---------------------------------------------------------------------------------------------------------------
Returns a string pointing to this article.



ReturnFormattedCityStateZip
public string ReturnFormattedCityStateZip (string strpassedString) 
---------------------------------------------------------------------------------------------------------------
This returns a fully formed CSZ string, such as "Boise, ID 83700-1234", punctuated and supertrimmed.  


Pass any CSZ field, formatted in any fashion, to this method
Returned is a single string: "City, State-Code Zip5-Zip4" 

States are resolved to USPostal two-character State-Codes, when possible
Properly punctuated, fully assembled, in the same upper-lower-case (case) as sent
Military, Canadian, and US Territory codes are supported

For example:
"Boise,   Idaho     83700 - 1234"  -- returns "Boise, ID 83700-1234"
"Boise ID 83700" -- returns "Boise, ID 83700"
"Miles City 83700" -- returns "Miles City 83700"  (note no comma)
",Utah 83700" -- returns "*, UT 83700"  (note the asterisk)

Do not use this method if you want to individual fields returned;  Instead, call the individual field methods, below.

This method is relatively inefficient because it calls each of the field routines below, and then re-assembles the results, making numerous calls the same parsing routines.




ReturnStateName
public string ReturnStateName (string strpassedString)
---------------------------------------------------------------------------------------------------------------
This returns the State-Code (State Name), Province, or US Territory Code, favoring US Postal recommendations when possible, but falling back to the as-typed version if it cannot be resolved.

For example,
"Id.", "ID", "Idaho", "Ida." -- all return "ID"
"N.Y.", "ny", "NewYork", "New York" -- all return "NY"
"S.C.", "S. Carolina", "S.Carolina", "South Carolina" -- all return "SC"

Canadian Province, U.S. Territories, and Military codes are supported.

Pass a standard CSZ string (e.g.  "Salt Lake City, Utah 84101"), with or without punctuation, returns "UT".

If the State-code cannot be reconciled against the US Postal recommendations, the state is returned, as-typed.  For example, "Boise, zIdaho" returns a state-value of "zIadaho", as typed.   The comma helps the decision.

Without a city-comma, the routine will return correctly-spelled State names or State-Codes and abbreviations into the STATE field; other wise, they are appended to the City Name, making the address likely still deliverable.  For example:

Boise Idaho 83700  -- returns State Code "ID"
Boise Zidaho 83700  -- returns State Code "" (empty), with city "Boise Zidaho"



ReturnCityName
public string ReturnCityName (string strpassedString)
---------------------------------------------------------------------------------------------------------------
Returns the City name from any CSZ string, with or without a city-comma.

A comma is not required to parse the city name, but in some instances, a comma will return better results, especially if the State-name is non-standard or non-determinable.

Multiple-word City names are supported:

"Post Falls, ID 83700"  -- returns "Post Falls"
"Post Falls ID  83700"   -- returns "Post Falls"
"Salt Lake City Utah"  -- returns "Salt Lake City"

The returned City name is in the same case (upper/lower) as-typed.
Your calling routine should upper-case or proper-case as needed*

Missing City names, such as a badly-formed CSV file, behave differently, depending on the city-comma.  For example, consider this string, with a leading comma:

",ID 83700"  --returns CityName = "*" (an asterisk)

indicating a required city is missing and this will not be deliverable by the post office.  The asterisk helps identify bad records.  Zipcodes can span multiple cities and in most cases, a city is required.  (However, with a zipcode, the State is optional, see below).

Badly-formed records, without a city-comma, will return a city name and will result in a deliverable mail, albeit it won't be "liked" by the Post Office:

"Boise 83700" or
"Boise, 83700"
-- returns CityName = "Boise";  State-Code = (empty). 



ReturnZipCode
public string ReturnZipCode (string strpassedString)

---------------------------------------------------------------------------------------------------------------
Returns the complete Zip or Postal-Code, including Zip-5+Zip4, as one string.  As with most public methods in this class, pass a fully-formed CSZ as the passed-string; returned results will be the ZipCode, fully-formed and punctuated.

For example, passing
"Boise, ID 83703-1234"  -- returns "83703-1234"
"Boise, ID 83703 1234"  -- returns "83703-1234"
"Boise, ID 837031234"  -- returns "83703-1234"
"Boise,    ID    83703"  -- returns "83703"
"Belleview ONT K01 1B2"  -- returns "K01-1B2"  (Canadian)

"Amherst MA 1003" -- returns "01003" - leading zero was stripped, typically by Excel, and re-added.
"Baton Rouge, MI" -- returns "" (empty-string - missing postal code)

Note: Does not confirm the ZipCode against the State, nor is the zipcode cross-checked for accuracy.



ReturnZip5
public string ReturnZip5 (string strpassedString)
---------------------------------------------------------------------------------------------------------------
Returns the Zip5-part of the ZipCode, stripping Zip4.  Pass a fully-formed CSZ (City-State-Zip) into the method and get returned the Zip5.

For example, passing
"Boise, ID 83703-1234" -- returns "83703"
"Boise ID 83703 1234"  -- returns "83703"
"Boise Idaho 837031234"  -- returns "83703"
"Boise, ID 83703"  -- returns "83703"
"Boise, ID"  -- returns "" (empty string)
"Belleview ONT K01 1B2"  -- returns "K01-1B2"  (Canadian)
"Belleview ON K011b2"  -- returns "K01-1B2"



ReturnZip4
public string ReturnZip4 (string strpassedString)
---------------------------------------------------------------------------------------------------------------
Returns only the Zip4-part of the ZipCode, if present.  Pass a fully-formed CSZ (City-State-Zip) into the method and get returned the Zip5.

For example, passing
"Boise, ID 83703-1234"  -- returns "1234"

"Boise Idaho 837031234"  -- returns "1234"
"Boise, ID 83703"  -- returns "" (empty string - no zip4 information)
"Boise, ID"  -- returns "" (empty string, no zipcode passed)
"Belleview ONT K01 1B2"  (Canadian)  -- returns "" (empty string)



ReturnStateAbbr
public string ReturnStateAbbr (string strpassedString
---------------------------------------------------------------------------------------------------------------
When passed a State Name or abbreviation, returns the US Postal recommended two-character State-Code, Province, or US. Territory.  This routine is called by all other public State methods and you do not need to call this routine directly.  It is exposed as a public method, should you find other needs. 

For example, passing
"Id"  -- returns "ID"
"District of Columbia"  -- returns "DC"
"W.V."  -- returns "WV"
"W.Virginia"  -- returns "WV"
"West Virginia"  -- returns "WV"
"W Virginia"  -- returns "WV"

If a State (province, etc.) cannot be resolved, the original string is returned, unmolested.  Common variants are supported (N.Y., NewYork, etc.).  Advise the author if you find any missing.

State-Codes can be parsed, with or without a comma (the city-comma), but work best when a comma is present.  See "ReturnCityName" for more information on comma-processing



ReturnCountryName
public string ReturnCountryName (string strpassedString
---------------------------------------------------------------------------------------------------------------
Returns the Country name, if typed on the CSZ line (be aware most people address the Country name on a separate envelope-line and it would not be seen or processed by this routine).

For example:
Boise, ID 83700-1234 U.S.  -- returns "U.S."
Belleview ON LDU-9Z1 Canada  -- returns "Canada"

This routine is relatively stupid.  Basically, everything to the right of the Zipcode is considered a Country name.  No effort is made to validate as this is just a parsing routine. 



Other Public Methods included in this Library:


SuperTrim
public string SuperTrim(string strpassedString)
---------------------------------------------------------------------------------------------------------------
Trims multiple leading, trailing and redundant interior spaces from a string.
Space-hyphne-Space (" - ") are compressed into a single hyphen.
Leading commas and hyphens are stripped (orphaned commas, orphaned hyphens).
Trailing hyphens are stripped.
EM and EMM dashes (long dashes) are replaced with simple hyphens.

For example:
"   The     rain  falls.  "  -- returns "The rain falls."
"Boise  , ID 83700 - 1234"  -- returns "Boise, ID 83700-1234"
",ID 83700"  -- returns "ID 83700"



CountWords
public int CountWords(string strpassedString)
---------------------------------------------------------------------------------------------------------------
Returns a numeric count showing how many words are in the string, where words are delimited with a space or hyphen.  Words are super-trimmed prior to counting -- multiple embedded spaces are compressed.  For example:

"Three   dog   night"  -- returns 3
"My three sons-and a daughter"  -- returns 6



ReturnFirstWord
ReturnLastWord

public string ReturnFirstWord(string strpassedString)
public string ReturnLastWord(string strpassedString)
---------------------------------------------------------------------------------------------------------------
Returns the first word or last word in a string.  If only one word passed, that word is returned.  The string is simple-trimmed before processing.  Hyphenated words and other punctuation are not considered in these routines.



FindLastSpacePos
public int FindLastSpacePos(string strpassedString)
---------------------------------------------------------------------------------------------------------------
Returns a numeric, base-zero count showing the last space (character) found in the string - Horizontal Position.  This is a simple ".LastIndexOf(' ')" and does not account for multiple interior spaces.  For best results, supertrim prior to calling.



TruncateTrailingPunctuation
public string TruncateTrailingPunctuation(string strpassedString)
---------------------------------------------------------------------------------------------------------------
Removes all manner of trailing punctuation on a string, including commas, periods, special characters. This uses a .TrimEnd(array) method.

See this article for a complete description of the class library, with download instructions
Keyliner: City-State-Zip DLL - Reliably Parse CSZ Fields