Sunday, 27 November 2016

Die Cortana!

How to disable Cortana.

Yes, in German, "The Cortana" must be stopped, not just because of the information Microsoft collects, but because we want Search Windows back in the start bar.


Cut and paste this into DieCortana.reg and then import it with Regedit, or open RegEdit with admin privs and make the change yourself. Then restart your computer if you dare....

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search]
"AllowCortana"=dword:00000000


Be warned, that Cortana still looks like she is running in your process tree, because the search and index tools have been rebranded to look like Cortana. Don't turn those off.

Tuesday, 22 November 2016

How to Fix Moto G MTP not working on Windows 10


OMG.

After spending two hours and a long uncomfortable call with Motorola that went nowhere, I finally managed to get MTP working on my new Moto G 4 phone.

Effectively, when I set the phone to MTP mode, the driver failed to load. I could run as PTP, but that didn't give me access to the whole FS...

Device manager told me that the install was incomplete due to a bad inf,

"a service installation section in this INF is invalid"


The advice on the internet was 
  • update the driver
  • reinstall the driver
  • turn it off and on again

and a variety of other shamanistic advice, none of which work.

Motorola's advice was to run their Device Manager to reinstall the drivers, but of course, that tool didn't recognize the device being there so... and then the advice was to call Microsoft support.  Sigh.

I found the solution myself. For whatever reason, the PNP tools were not actually getting to install the right INF, even when I selected it via "legacy hardware", likely because some other config was getting hit first.

If you have the same issue, simply do this.
  • Run an administrator cmd shell
  • cd to \windows\inf
C:\Windows\INF>pnputil /?
Microsoft PnP Utility

PNPUTIL [/add-driver <...> | /delete-driver <...> |
         /export-driver <...> | /enum-drivers | /?]

Commands:

  /add-driver <filename.inf | *.inf> [/subdirs] [/install]

    Add driver package(s) into the driver store.
      /subdirs - traverse sub directories for driver packages.
      /install - install/update drivers on any matching devices.

  /delete-driver <oem#.inf> [/force]

    Delete driver package from the driver store.
      /force - delete driver package even when it is in use by devices.

  /export-driver <oem#.inf | *> <target directory>

    Export driver package(s) from the driver store into a target directory.

  /enum-drivers

    Enumerate all 3rd party driver packages in the driver store.

  /?

    Show this usage screen.

Legacy Commands:

  [-i] -a <filename.inf> ==> /add-driver <filename.inf> [/install]
  [-f] -d <oem#.inf>     ==> /delete-driver <oem#.inf> [/force]
  -e                     ==> /enum-drivers

Examples:

  pnputil /add-driver x:\driver.inf       <- Add driver package
  pnputil /add-driver c:\oem\*.inf        <- Add multiple driver packages
  pnputil /add-driver device.inf /install <- Add and install driver package
  pnputil /enum-drivers                   <- Enumerate OEM driver packages
  pnputil /delete-driver oem0.inf         <- Delete driver package
  pnputil /delete-driver oem1.inf /force  <- Force delete driver package
  pnputil /export-driver oem6.inf .       <- Export driver package
  pnputil /export-driver * c:\backup      <- Export all driver packages


C:\Windows\INF>pnputil /add-driver wpdmtp.inf /install
Microsoft PnP Utility

Adding driver package:  wpdmtp.inf
Driver package added successfully.
Published Name:         wpdmtp.inf
Driver package matches devices that already have their drivers up to date.

Total driver packages:  1
Added driver packages:  0

C:\Windows\INF>