Tag Archives: Windows Tutorial

Windows Tutorial for operating systems are particularly common on personal computers and servers.

Source Code preview in Windows File Explorer

It can be helpful for developers to look into the source code of files, with the preview of the Windows File Explorer, without need opening all the files.

Source Code Preview with File Explorer

Specifying File Handlers for File Name Extensions with add the registry classes keys to preview files for php, ps1, py, css, vbs, shell scripts and more in File Explorer with just expanding it.

To do this, open a command prompt with elevated rights as an administrator and add the following lines.

REG ADD "HKCR\.sh" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.sh" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.sh" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.sh\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.php" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.php" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.php" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.php\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.py" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.py" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.py" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.py\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.ps1" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.ps1" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.ps1" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.ps1\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.css" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.css" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.css" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.css\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.vbs" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.vbs" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.vbs" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.vbs\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

Now just activate the preview in Windows File Explorer.

Enable PowerToys Thumbnail Previews

Another approachis brings PowerToys. Preview Pane is an existing feature in the Windows File Explorer. Which allows you to see a preview of the file’s contents in the view’s reading pane. PowerToys adds multiple extensions: Markdown, SVG, PDF, and G-code. In addition to those, PowerToys also adds support for source code files (for more than 150 file extensions).

Settings for Source code files previewer

If the preview pane does not appear to work after setting the extension to On. There is an advanced setting in Windows that may be blocking the preview handler. Open the Options menu in Windows File Explorer and select the View tab. Under the View tab, you will see a list of Advanced settings. Ensure that Show preview handlers in preview pane has a check next to it in order for the preview pane to display.

Open Windows File Explorer, select the View menu in the File Explorer ribbon. Hover over Show, and then select Preview pane.

Office Something went wrong, error code 80090016

Microsoft Office 365 users may experience the error message (“Something went wrong”) with the error code 80090016 when logging into the Office 365 account from Word or Excel:

Office something went wrong, error code 80090016

Cause

It is no longer possible to log in to the Microsoft Office 365 account from an Office or Microsoft 365 application. Office something went wrong. The password entry no longer appears, or no response follows after the entry. The credentials underlying the Microsoft Trusted Platform are no longer valid.

Solution

The Microsoft Office error code 80090016 is due to incorrect processing of the TPM cryptography module. The Trusted Platform credentials must be reset. This under the user profile path %localappdata\%Packages it is the folder Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy.

By typing into the Explorer address bar: %localappdata%\Packages the folder Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy Rename to _old.

C:\Users\<username>\appdata\local\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy_old

Next time you log on to your Microsoft Office 365 account, it will become the Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy folder recreated. The newly generated credentials can be processed correctly by the Trusted Platform. The message no longer appears.

what is Trusted Platform Module (TPM)

The Trusted Platform Module (TPM) technology is designed to provide hardware-based, security-related functions. A TPM chip is a secure crypto-processor that is designed to carry out cryptographic operations. The chip includes multiple physical security mechanisms to make it tamper-resistant, and malicious software is unable to tamper with the security functions of the TPM.

The most common TPM functions are used for system integrity measurements and for key creation and use. During the boot process of a system, the boot code that is loaded (including firmware and the operating system components) can be measured and recorded in the TPM. The integrity measurements can be used as evidence for how a system started and to make sure that a TPM-based key was used only when the correct software was used to boot the system.

TPM-based keys can be configured in a variety of ways. One option is to make a TPM-based key unavailable outside the TPM. This is good to mitigate phishing attacks because it prevents the key from being copied and used without the TPM. TPM-based keys can also be configured to require an authorization value to use them. If too many incorrect authorization guesses occur, the TPM will activate its dictionary attack logic and prevent further authorization value guesses.