2020-06-23

Windows 10 Command Prompt Black

Problem:  Windows 10 Command Prompt all black. 
CMD CMD.exe all black; black text on black background. 

This appears to be a problem after updating to
2020-06 Cumulative Update for Windows 10 version 1909 (KB4560960)
               Noted that CMD.exe was updated in this release.

Symptoms:
  • When running a DOS prompt from a Windows Start menu tile: all black window
  • When running from Start, (search), CMD.exe: all black
     
  • When running from Task Manager - runs properly
    ctrl-Alt-Delete, select Task Manager. 
    Top-menu, File, "Run New Task"
    Type "cmd.exe"
     
  • Diagnostics:  From within the CMD window, use mouse to select all text (see top icon-menu, Edit, Mark, (highlight text), Edit Copy), then paste into Notepad.  (Text will not be visible while highlighting)  The pasted DOS results are visible in Notepad.  DOS is clearly running, but results not visible.  

  • This is a problem with the current (local or MS) profile.  If you have a second workstation login (for example, a local administrative account), you will find the DOS prompt behaves properly.  This cannot be a problem with the CMD.exe.  Plus, cmd.exe works through other venues, such as Start New Task.

  • This is not a color black-on-black issue.  See DOS icon menu, Preferences, Colors.
Temporary Workarounds:

First Workaround:
Run Task Manager (ctrl-Alt-Delete)
From the top menu, select File, "Run New Task".
Type CMD.exe and allow it to run.
DOS will launch with normal colors; clearly this is not a Color issue.

Second Workaround:
Using File Explorer, open folder C:\windows\system32
Locate CMD.exe. 
Double-click to launch

Third Workaround:
In C:\windows\System32  locate CMD.exe (see directly above)
Pin to Task Bar-- this copy will work (while the desktop tile does not work)


Issue:
This is a corruption in the user's Tiles but details on this are scarce.  Tiles are stored in a user-profile database, not directly tied to the NTUSER.DAT.  I would rather fix the real problem than hide the issue behind a rebuilt profile.  But rebuilding is what I did.


Ineffective solutions


- These solutions did not work but the net suggests them.  Let me save you the trouble, knowing you have searched for these and wondered if they would work.  I tried all:

a.  Rebooting does not help.

b.  Many articles suggest the fore-ground and background colors are the same (black).  This is clearly the issue, but the [color] settings are not the problem.  Fiddle with this and you will find it does not resolve the problem.

If curious:  From the (Black) CMD.exe window, selecting top-left-icon, PROPERTIES, [Colors]. 
Change the background to a different color. 
Close and re-launch CMD.exe for changes to take effect. 

c.  Also suggested, but does not work:  Registry edit:  "HKLM\software\microsoft\Command Processor", "Default Color",.  Color settings in this key appear proper (hex values not documented here).  If changed, close and re-launch CMD.exe for changes to take effect.

d.  Deleting the Windows Start Menu tile and re-creating the tile does not work.

e.  (I have not tried un-installing recent KB patches.)

f.  Running "sfc /scannow" did not help
     Running: DISM.exe /Online /Cleanup-image /Restorehealth   did not help

g.  Deleting the Tile Cache (deep inside the profile; not detailed here because of the risk) did not solve the problem.  Plus it caused other problems, not documented here. 


The Unpalatable Solution:

1.  Create a new Local User Profile (This fixed this problem), but there is much labor.  I did this.  See detailed steps below. Am not fond of this.

Steps: Destroying and Rebuilding Profile:

This is how I fixed the problem, but I am not fond of this solution.  You will be deleting your existing profile and rebuilding a new one. You will lose all preferences in programs like WordPerfect, Office, etc..  Desktop tiles will have to be rebuilt. 

All can be re-constructed.  This is not hard, but is a nuisance..
This has implications to your documents and preferences.  Follow steps closely.

Rough steps:

0.  Record your current Microsoft Login account:
     Click Start, Settings (Gear icon), "Accounts"
     Note your login email address. 
     The password is the one used when logging into the machine.

     If not prompted for a password/PIN when the machine boots,
     login to https://account.microsoft.com  and confirm your password.
 
1.  Using File Explorer, make a backup of all documents in your Documents folder.
     See  C:\Users\(your userID)\Documents
     Place backup in any location other than C:\Users\(your UserID)

     Consider how to backup your browser's preferences, bookmarks, etc. 
     This varies by browser, by browser version.
     I should write an article about this.

2.  Take a screenshot of your Start Menu for documentation.
     Save to any location on the C:\drive -- any location except your DOCUMENTS folder.
     Example:  C:\data\ProfileBackup.png

3.  Build a second User-account on the workstation.  This will be a back-door "Admin" account.

     This is a required step.  Article here:
     http://keyliner.blogspot.com/2020/02/windows-10-administrative-accounts.html

     Confirm this account has local Administrative rights (steps in article)
     From the article, no need to "demote" your regular account to a non-admin
        account as that account will be soon deleted..
     Confirm login to this account

4.  From the article, logout of your normal account (you must log out or reboot)
     Login as the new ADMIN account.

5.  In Windows Settings (Gear icon), click "Accounts"
     Locate and Remove (delete) your normal account.
     (Steps not detailed here.  Follow prompts)

6.  Start an elevated Command Prompt (DOS)
     (Start, Run, "CMD"; Launch as Administrator)

     Type this command:
  net user /add  yourUserID  somepassword

     example:
     net user /add keyliner mySecretPassword22

     Note: By default, this new account (new profile) will be a non-administrative user. 
     Recommend leaving it this way (see article).  If you intend to delete the Admin account
     from step2, you must promote your new "yourUserID" account to an Administrative user.

     Note:  Windows 10 gets confused when the main profile is deleted.  Oddly, you cannot use
     the Control Panel or Gear icon to rebuild the profile, even though those screens have an
     +Add User button.  This forces you to use a command prompt. 
     Unsure why this is and I have not pursued.

7.  Log out of the Admin account. 
     (Start, click "person icon", log-out)

     Login as the new user: 
     (Start, click "person icon", login to the new account)
     This will act like Windows is first-time launching while it builds a new profile.
     This takes a few minutes.

8.  Recommended: 

     Once logged in, click the Windows Settings icon (Start, Gear)
     Go to Accounts.
     Convert the account from a "Local" account to a Microsoft Account.
     Use the same email address/login as the original user-id.
     Steps not detailed here, sorry.

     Reason:  Let Microsoft store your preferences, passwords, etc. 
     Easier to recover if account problems or if entire PC needs to be re-built.

     Microsoft will offer to use a PIN.  Allow this to happen.
     Click the Checkbox to enable alpha-numeric characters and make the PIN the same
     as your login password (recommended).
 
     If you have two-factor authentication enabled (you should!), Microsoft's Authenticator app
        will request authorization.

9.  Using your screenshot as a guide, rebuild all tiles:

     On the Start menu bar, in search, type "Excel". 
     At the program's icon, "other-mouse-click", Pin to Start.
     Rebuild all icon.s
 
     Launch each program.  Set your normal program preferences (default data folders, etc.)


Done.
What a pain.  All this because of a corruption in the Tile menus.

I have been unable to find the Tile database, that is stored in the profile.  Clearing the Tile Cache caused grief.  It may be the cache *is* the database but I doubt it - I found too many icons missing from the cache.  It must serve another purpose.

Related and not part of this issue:  Microsoft announced the DOS prompt / Command-prompt is now deprecated.  Powershell is the replacement. I'll have to write an article with all the replacement commands.


2020-06-04

Lenovo Yoga 900 13ISK Black Screen Wake from Hibernate

Lenovo Yoga 900 13ISK does not wake from sleep or hibernation while plugged into AC power.

Symptoms:
Laptop went to sleep / hibernate / hibernation while on AC Power.
On power-up, with or without AC, appears to boot / wake, but screen black; no activity.
Power-light (right-side edge) on.
No keyboard lights.

Rebooting does not resolve problem.

Immediate Recovery with hard-boot:
1.  Disconnect AC  (assumes battery is partially charged)
2.  Press and hold power-button for 20-seconds.  Release.
3.  Press and hold power-button for (2 seconds).  Release.
Machine should boot.

Long-term Solution:
A.  Update the Intel windows MEI driver.

Go to Intel.com
Search for the current Windows 10 MEI Driver (search "MEI").
As of 2020.06
https://downloadcenter.intel.com/download/28679/Intel-Management-Engine-Driver-for-Windows-8-1-and-Windows-10?wapkw=MEI

Note:  For this laptop, Lenovo's support site lists an older version of the MEI driver, dated (late 2018) -- newer than the drivers that shipped with the machine but not as new as Intel's version.  This is the last version Lenovo officially tested.  Instead, download Intel's latest version.  

Installation requires administrative rights; you will be prompted for UAC approval.

Since this problem is indeterminate and not re-produceable, I may come back to update this article, but initial testing looks promising.