06/11/2025
[Windows] Delete recovery partition
01/11/2025
[Windows 11] Disable lnk resolver
- User Configuration\Administrative Templates\Start Menu and Taskbar\Do not use the search-based method when resolving shell shortcuts
- User Configuration\Administrative Templates\Start Menu and Taskbar\Do not use the tracking-based method when resolving shell shortcuts
- User Configuration\Administrative Templates\Windows Components\File Explorer\Do not track shell shortcuts during roaming
06/08/2025
[Bing] Disable AI search clutter
24/04/2025
[Windows 11] Uninstall widgets app
[Windows] Hash a file
23/04/2025
[Windows 11] Disable telemetry and diagnostic data
Windows 11 collects some data and allows some configuration under Settings > Privacy & Security > Diagnostics & Feedback however you are not allowed to completely disable it. If you wanted to do so, you could apply a policy using the Local Group Policy Editor app (gpedit).
Find the Local Computer Policy > Administrative Templates > Windows Components > Data Collection and Preview Builds > Allow Diagnostic Data
Click to modify it, enable it and set it to "Diagnostic data off"
You can then logout and login again or run from a terminal the command to force reload policies:
gpupdate /force
[Windows 11] Remove PhoneLink app
Removing the PhoneLink app on Windows, is as easy as running (from administrator shell):
Get-AppxPackage Microsoft.YourPhone -AllUsers | Remove-AppxPackage
12/03/2025
[Windows 11] Initial setup without forced login
09/11/2023
[Windows 11] Default show more options explorer right click menu (old UI behavior)
One change with Windows 11 is that the right click menu in Explorer was replaced with some condensed version where the old behavior is hidden behind a "Show more options" entry. This makes some actions slower to find and quite annoying, for example 7-zip or Notepad++
To revert it to the nicer old UI you can add a personal registry key, by typing this in a command prompt:
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
Then logout and login again or restart explorer process to see the effect take place.
This is setting an override on the default config found under (which remains untouched):
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InProcServer32
To undo the change, simply delete the registry key created by the command.
06/11/2023
[Tampermonkey] Disable Bing Chat search integrations
When using Bing search there are multiple places that integrate the Chat functionality with the ChatGPT AI. Some of these integrations are annoying and can be easily disabled by installing the Tampermonkey browser extension then adding a couple scripts to modify the displayed webpage and its behavior.
// ==UserScript==
// @name Disable Bing Search Engine Scroll
// @namespace your-namespace
// @description Disables scrolling on the Bing search engine page to prevent accidental scrolling into the Bing chat feature.
// @match https://www.bing.com/*
// @version 1
// @grant none
// ==/UserScript==
window.addEventListener("wheel", e=>{
if(e.target.className.includes("cib-serp-main")) e.stopPropagation();
});
- Disable sidebar Chat autosearch functionality when disaplying search results:
// ==UserScript==
// @name Disable Bing Chat autosearch
// @namespace your-namespace
// @description Disables the Bing Chat autosearch functionality on the right side of results when doing a search.
// @match https://www.bing.com/*
// @version 1
// @grant none
// ==/UserScript==
const element = document.getElementById("sydwrap_wrapper");
element.remove();
const element1 = document.getElementById("b_sydTigerCont");
element1.remove();
21/04/2020
[Windows] Share environment variables in Windows Subsystem for Linux
Luckily there is a workaround, using the WSLENV variable. Unfortunately, it is not a direct 1:1 translation of your existing variables, rather you will need to craft them manually and convert between the two environments before you run a command or switch environment.
For example, to pass your JAVA_HOME correctly to wsl:
set JAVA_HOME=%JAVA_HOME%
set WSLENV=JAVA_HOME/up
wsl
echo $JAVA_HOME
And the magic is behind that last /up flag which says: set the value when invoking WSL from Windows (u) and translate between Windows and Unix paths (p)
WARNING: spaces are NOT escaped
WARNING2: only ONE variable is shared, so you cannot share both JAVA_HOME and PATH for example at the same time
[Windows] Activate and configure Windows Subsystem for Linux
Setup could be a bit more straightforward, but still not a big issue:
- Enable Windows Subsystem for Linux as a Windows feature from Control Panel > Programs and Features > Turn Windows features on or off
- Reboot
- Make sure LxssManager service is running
- Install a Linux distro from Windows store, search for "WSL" and pick the one you prefer, for example Alpine or Ubuntu, if no distro is installed, you get an error instead:
17/04/2020
[Windows] Store command output in variable in batch script
FOR /F "tokens=*" %%g IN ('your_command ^| with_escaped_pipe_if_you_need_it') do (SET VAR=%%g)
18/03/2019
[Ubuntu] Install Microsoft fonts
20/03/2017
[SQL] Excel COUNTIFS - count columns matching criteria in a row
28/02/2016
[VBA] Excel open popup from macro
As usual when business users try their hands at this newfangled tech stuff, they will end up putting in a minuscule yet showstopping mistake you need to spot.
Although the VBA debugger is actually pretty good, sometimes the error is just stemming from a wrong value being inserted in a cell. In this case, it's just faster to simply display the value(s) in a popup window and then searhing for the offending cell in the spreadsheet.
The MsgBox function alongside with the CStr one will become your new best friends here:
MsgBox ("I am putting this value " & CStr(your_value) & " but maybe it is wrong")
Where & is used to concatenate strings and your_value can be a variable or an expression within the macro you're debugging.
07/11/2015
[TIBCO Spotfire] Excel JDBC data source template
The idea is simple: as long as you have a proper JDBC driver and can supply basic details on how to connect and handle operations, Spotfire Server allows you to add a custom connection template that end users will be able to select when creating a new Data Source. [2]
Here is a sample connection template for Excel. Note that in this case you will need the ODBC driver as well.
<jdbc-type-settings>
<!-- Informative name and display-name -->
<type-name>ODBC-EXCEL</type-name>
<!-- point out the JDBC-ODBC bridge -->
<driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
<!-- Pattern displayed to administrator when setting up the Datasource -->
<connection-url-pattern>jdbc:odbc:excel-odbc-source</connection-url-pattern>
<!-- Table types allowed for EXCEL is TABLE and SYSTEM TABLE -->
<table-types>TABLE, SYSTEM TABLE</table-types>
<!-- As ping command we will use the integer constant 1. Could really be any pseudo function. -->
<ping-command>SELECT 1</ping-command>
<connection-properties />
<!-- Excel does not support catalogs nor schemas -->
<supports-catalogs>false</supports-catalogs>
<supports-schemas>false</supports-schemas>
<!-- Found an error in excel not allowing Distinct in combination with order-by on all columns. -->
<!-- Choice between supporting order by and distinct in favor for distinct -->
<!-- to make prompt without duplicates and support distinct conditioning. -->
<supports-order-by>false</supports-order-by>
<!-- Format pattern for date, time and datetime (same as timestamp). -->
<date-literal-format-expression>{d '$$value$$'}</date-literal-format-expression>
<time-literal-format-expression>{t '$$value$$'}</time-literal-format-expression>
<date-time-literal-format-expression>{ts '$$value$$'}</date-time-literal-format-expression>
</jdbc-type-settings>
[1] Data source template documentation - Chapter 11.5
[2] Sample guidelines to add Attivio as data source
24/05/2014
[Windows] Scan hosts for open ports without Telnet with PortQry
telnet host port
but unfortunately, Windows comes with the Telnet client disabled by default. Since enabling it requires you to have Administrator privileges, an alternative is to use Microsoft PortQry which is a command line tool with no installation required.
After downloading and extracting it, you can run it as:
portqry -n host -e port
14/02/2014
[Microsoft Access] UPDATE table SELECT FROM nested query
UPDATE A, B
SET A.column = B.column
WHERE A.key = B.key
which is equal to SQL's:
UPDATE A
SET column = (
SELECT B.column
FROM B
WHERE A.key = B.key)
24/12/2013
[Windows] Install WIM images with ImageX
You'll firstly need to copy the ImageX files on a bootable USB drive - or whatever you prefer - and the .wim images on a support accessible from your PC at boot time (network drive, system partition, USB disk, etc...)
Now reboot the system and configure the bootloader to load the ImageX support first; you'll be brought to a command line shell you can interact with.
Note: If you need to alter the disk partitioning, run the diskpart command first.
To install the image(s) simply run the following command:
PATH_TO_IMAGEX_DRIVE\imagex.exe /apply PATH_TO_IMAGES\IMAGE_NAME WIM_VOLUME_NUMBER DRIVE_LETTER
eg:
G:\imagex.exe /apply H:\images\win7.wim 1 C:\
Copying the image onto the specified destination may take some time, so just sit back and wait. Here's a full list of ImageX's command line options.