directional sign on a sidewalk

Force Edge to do not redirect HTTP → HTTPS

A quick note on all steps needed for making sure that Edge won’t do any HTTP to HTTPS redirect:

  1. Set Automatic HTTPS (edge://flags/#edge-automatic-https) to Disabled.
  2. Disable HTTP Strict Transport Security (source):
    • Go to Net InternalsDomain Security Policy (edge://net-internals/#hsts).
    • Enter domain name into Domain field in Delete domain security policies and hit Enter (source).
    • Enter domain name into Domain field in Query HSTS/PKP domain and hit Enter to validate (source).
  3. Press Ctrl+Shift+Del, and delete all cache and browsing history (source).
  4. Add your domain in Insecure content (edge://settings/content/insecureContent) → Allow list (source).
  5. Restart Microsoft Edge.

If after above your domain or page is still being redirected to https:// after you specifically type http:// in your URL then there’s 99% chance that the redirect is server-side and there is nothing more that you can do prevent it on the client side. Sorry!

green and black industrial machine

The magic of using Print Management

I have spent my entire life with Windows (starting with Windows 3.1) and I have never ever found before how cool application we have there. It seems that Print Management in Windows can solve problems that were unsolvable before or can make solving some other problems much easier.

Cannot remove pesky “OneNote (Desktop)” driver that keeps returning? Your network printer has stopped printing suddenly? Well, go ahead and give it a try…

Read More “The magic of using Print Management”
close up view of system hacking in a monitor

The fastest way for deleting Windows.old folder

Since this is a special system folder, removing it via regular won’t work.

There are many approaches to this task, including disk cleanup tools and system settings. I found the fastest one to run either command line or terminal and executing:

takeown /F C:\Windows.old\* /R /A /D Y
icacls C:\Windows.old\*.* /T /grant administrators:F
Remove-Item -Path "C:\Windows.old" -Recurse -Force

Must be run as an administrator of course.

a close up shot of a portable bluetooth speakers

Restarting Windows does NOT restart Bluetooth!

A memo to future self or a not to other people not aware about this simple fact.

If you Bluetooth connection or devices start getting wako in Windows 11, restarting the whole system in many scenarios won’t change anything. While turning Bluetooth off and on again can do the magic.

I had a situation where after getting Windows 11 24H2 update all my Bluetooth devices were gone (empty list) and not connecting and using “Add device” to pair them again resulted in not finding any new device.

Restarting Windows brought no change. Restarting Bluetooth adapter solved everything.

blue denim pants

Pack contents of subfolders to a separate .zip file in Windows

I had a collection of e-books and video courses, each of them having _code_ folder containing sometimes even 30-40 subfolders and each of these subfolders containing sometimes even hundreds of thousands of files. I wanted to batch-pack contents of each folder into a separate .zip file.

The “contents” is a key here. I did not want to end up with a bunch of .zip files having one folder in its root.

Read More “Pack contents of subfolders to a separate .zip file in Windows”
white painted papers

New PDF viewer in Edge doesn’t support OCR at all

Microsoft has rolled out a new update to Edge. It includes something called “New PDF Viewer”:

New PDF Viewer

Enables the new experimental version of PDF reader. — Mac, Windows

#edge-new-pdf-viewer

Sadly, the new experimental version of PDF reader doesn’t support OCR at all.

You can open any of your existing or newly created PDFs. If it contains any text layer, you won’t be able to notice it. Neither trying to select any piece of document with mouse or pressing Ctrl+A have any result.

Read More “New PDF viewer in Edge doesn’t support OCR at all”
person using macbook air

Reload page without cache in Microsoft Edge

Pressing Ctrl+Shift+R for Hard Refresh (instead of Ctrl+R for Normal Refresh) may not always invalidate cache of the page that you are currently viewing.

If you want to truly reload page from server (bypassing local copy stored in cache) then you must:

  • Press Ctrl+Shift+I to open Dev Tools for a moment
  • Right-click Refresh button in the toolbar
  • Click Empty cache and hard refresh option in context menu

Since Edge is based on Chromium, the very same trick will work in Chrome as well.

Source: Super User.

boy in white t shirt sitting on chair in front of computer

Shorthand notation for Yii commands

Developing PHP applications in Yii 2 makes you use Yii command-line commands quite often (for example for data migrations etc).

Since I am a Windows maniac, I have to type php yii before each command each and every time. A bit tiring. I wanted to make this a little bit easy. For example, to be able to type y migrate instead of: php yii migrate.

Getting there was quite easy for Windows scripts and using Windows Terminal. Things has got a little bit complicated when trying to achieve the same in PhpStorm. Which uses GitBash instead.

Read More “Shorthand notation for Yii commands”

Replace “new” Paint with Classic Paint

Deleting or moving selection in Paint reveals emptiness… that is alpha channel instead of (as for past 30+ years) background color.

This is one of many stupid things introduced in “new” Paint that comes to you along with September 2023 software update. And naturally cannot be turned off by means of changing anything in configuration. It is always one Microsoft way.

The easiest and fastest way of getting rid of this, is to get “old” Paint back.

Read More “Replace “new” Paint with Classic Paint”

Bring back ALL the original Windows 11 apps

Many users starts their journey with Windows from uninstalling all the crap that ships with the system. Sometimes you may go a bit too far with that process and remove something that you actually need or an app that (when missing) causes Windows to act strangely.

In such case you can run Windows PowerShell as an administrator and execute the following command:

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Keep in mind that it will reinstall all the apps that your Windows originally came with! In my case it was 115 apps added (I didn’t even realized before that I removed that much crap out of my Windows 11).

Fix for up-side down duplex scanning in WIA

When scanning using WIA (Windows Image Acquisition) through certain apps (NAPS2 — Not Another PDF Scanner 2 in my case) and on certain scanners (Canon MX920 in my case), you may run into situation where all odd pages are scanned up-side down. Even though they’re all fed correctly to the ADF:

This is certainly not your software problem and most likely not WIA’s one, but probably comes from the fact how your scanner driver “talks” through WIA to your scanning software.

Fortunately, fix is very simple.

Read More “Fix for up-side down duplex scanning in WIA”

Extension incorrectly registered in Windows 11 and how to fix this [updated]

This document is now updated for Windows 11, version 22H2 installed on 28.09.2022.

I have installed IrfanView (for browsing images) and VLC VideoLAN (for watching video) — my “default pack” on freshly installed Windows 11 Pro. It turned out that many common file extensions (like .gif, .png, .jpg, .mp4, .mkv and .avi) are not registered with the corresponding applications. While all others (like .bmp, .mp3, .wav, etc.) are registered correctly.

Microsoft has messed things up even further with Windows 11 so the regular methods of manually registering these file extensions (that were working just perfectly in Windows 10) are not working anymore.

If you’re struggling with this or similar problem then you may find certain solutions in this blog post.

Read More “Extension incorrectly registered in Windows 11 and how to fix this [updated]”

Remove garbage from Windows 11

Four years later (after this article) I am removing “uninstallable” garbage from Windows 11 this time. The “uninstallable” is a new word that denotes applications, programs and system elements that you cannot uninstall the regular way (i.e. using Add or Remove Programs component in Settings). But you can with a little bit help from Windows PowerShell and this article.

To not make this post too long, consider it as an update to the original text with only list of applications that can be uninstalled the mentioned way from Windows 11. If you have any additional questions or problems (i.e. how to bring back something incorrectly uninstalled) then, please, refer to the original post.

Read More “Remove garbage from Windows 11”

Reduce PowerPoint presentation’s file size in easy steps

In these days we want to have our PowerPoint presentations “rich and beautiful”. Cool fonts, soft backgrounds and a serie of animations or transitions that pisses-off everyone except presentation’s author are just not enough. We want to have many beautiful images do depict our presentations. Maybe we even want every slide to have different fully photographic background etc.

This is especially true given the fact that there are many services like pixabay.com which offers you hundreds of thousands of beautiful photos completely royalty-free.

However, there’s a well known problem with PowerPoint. If you add any filter or modification to the image placed on some slide, it will be internally saved as PNG format irrespective of the actual format that source image has!

For example, I had a tiny, 9-slides presentation, where each slide had a different full-page photo as a background. Because images were too bright (overlying slide’s text was hard to read), I applied a -40% brightness filter to each image. All my nine source images were saved as JPEGs and took only 1.50 MB on disk. But PowerPoint presentation using them had… 18,1 MB! Over ten times more. And I had to implement a serie of steps to prevent that.

Read More “Reduce PowerPoint presentation’s file size in easy steps”

Customize how Office starts or default Office templates

You can have customized document (Word), workbook and worksheet (Excel) or presentation (PowerPoint) opened up as default whenever you start corresponding Microsoft Office application.

In this article I’ll be talking a little bit about file name, content and location for each of three key Microsoft Office components. That is, what to store, where to store and how to name a file.

Read More “Customize how Office starts or default Office templates”

Duplicating current tab out of omnibar

Most of you probably know this for years, I have discovered this today:

  • Ctrl+Enter in browser’s omnibar — open currently entered URL in new window
  • Alt+Enter — open in new tab

Tested in Microsoft Edge. Probably works in Chrome and maybe in others.

Works for URL currently entered to the omnibar, not on current page’s URL. Meaning that you can hit F4 then change current page’s URL a little bit and then hit one of those above and get modified URL opened in either new window or tab.

Useful for quickly duplication current tab: F4 + Alt+Enter.

I know that there’s Ctrl+Alt+K, but it seems less natural to be remembered and doesn’t allow to duplicate current tab with modified URL, because it works on current page’s URL.

Prevent PowerPoint from auto-changing typing language

On freshly installed PowerPoint when you start typing any content in any slide, your language will be automatically changed to your keyboard language layout. If you have your presentation in any other language they you’ll start seeing (nearly) every word underlined as not correct, which is very annoying.

Both solutions that I found in the Internet (this one and this one) turned out to be wrong or not enough, so I had to come with my own.

Read More “Prevent PowerPoint from auto-changing typing language”

Running Office 365 apps in Safe Mode

There’s a handy Safe Mode for all Office 365 offline apps (and probably for older version of Office as well) that you can use to start any Office app without any add-ins and many other things (like themes, animations, etc.) turned off or disabled. Very handy for diagnosing possible problems with some Office app.

To enable it, simply hold Ctrl key when launching any of Office app. When you see app’s button in the taskbar, release the Ctrl key, click that button and answer Yes in the dialog window that appears:

That would be pretty much all.

Simple data validation or enum fields in Excel

Excel is still often used for simple time tracking or roadmap planning in small IT projects. It is good to know that with a simple steps you can create a basic data validation for certain fields in your sheets.

Kind of validation, as discussed here, focuses on forcing user to select or enter only values that are found in some reference list (dictionary). A classing enum / enumerator field well known in databases. If user provided an incorrect (out of scope) value then an error is displayed:

Unfortunately, due to nature of Microsoft Excel, this fails completely when data is pasted.

Read More “Simple data validation or enum fields in Excel”

Get rid of “Pick up where you left off” from Word — three methods

Microsoft loves to “enrich” our lives with a wonderful (in their opinion) yet totally useless and pissing off (in our opinions) features. The “Pick up where you left off” is one of them.

This tiny little thing wouldn’t be so irritating and could be easily ignored, if it wouldn’t be for a single fact. It blocks keyboard shortcuts completely, until it hides itself (so for approx. 3-5 seconds)! Preventing you from pressing Ctrl+F to do an ultra-fast-searching-millisecond-after-opening-a-document (my beloved feature).

There’s a fairly easy solution to this problem (my own article) that requires you to do some dirty tricks in the Windows Registry. One and a half month after writing that article it turned out that a method described there simply isn’t working at all on one of my computers. So I came out with the following post.

Read More “Get rid of “Pick up where you left off” from Word — three methods”

Disable “Pick up where you left off” in Word

The “Pick up where you left off” is one of the worst features that Microsoft added to Word, because it prevents you from quickly opening and searching the document. With this feature enabled, now you have to wait approx. 3-5 seconds after you open any document and before you can hit Ctrl+F.

Disabling this feature is fairly easy, but — because this is Microsoft — again involves messing up with the Windows Registry, so you need administrator account in order to perform these steps.

Read More “Disable “Pick up where you left off” in Word”

Remove one-letter word (orphans) from the end of line

In English an orphan is:

A paragraph-opening line that appears by itself at the bottom of a page or column, thus separated from the rest of the text

Thus, in English typography it is understood in the context of the whole paragraph. Single line of a new paragraph, left alone on the preceding page (before page break) is not allowed.

Polish language is more strict by that and “explores” an alternative (less known) definition of “orphan”. In Polish typography this term is understood in the context of single line and regarded as a:

Single word (single letter in most cases) left along at the end of line (next to right paragraph).

And similarly this is prohibited in Polish typesetting.

In this article you can find a Word macro for removing such orphans from your text.

Read More “Remove one-letter word (orphans) from the end of line”