How to invoke UAC in a Windows Batch script

Here is my quick and easy way to raise the privilage level of a Windows Batch script; allowing you to run your code at an administrator level. This is not a new question and has been asked many times on StackOverflow forums. The best answer I was able to find was the following from dbenham: https://stackoverflow.com/questions/1894967/how-to-request-administrator-access-inside-a-batch-file/10052222#10052222 That being said there are many ways to skin this cat, so I came up with my own method, all be it derivative. The main difference in the following code is that you will always get a UAC prompt in my variant of the code, even if you are currently running it as an account that is a member of the local administrators group: ...

29 December 2020 · 2 min · Tom

How To call a bash command with variables in Python

A quick Google of the above only seemed to give me answers for the inverse, calling a python script from a bash shell and handing it variables. At least, the first 3 results showed this and I’m probably not alone when it comes to scrolling down past the StackOverflow articles. So I am had to go it alone and the way that I figured out how to call a bash command with variables in Python (3), is a total hack… But it works. This is commonly referred to as ‘getting the job done’ code. ...

28 December 2020 · 3 min · Tom

Monitor your public IP address with Python

This is my lean and effective way to monitor your public IP address with Python, specifically Python3. The script – code and GitHub link below – runs on a continuous loop, which I covered in a previous post: here. NOTE: this code is reliant on the dig system command – so this essentially only work on a unix based system. I was running this on a Debian install. import os import subprocess import re import time print("start monitor vpn monitor check") expected_IP: "0.0.0.0" # ENTER YOUR EXPECTED PUBLIC IPv4 ADDRESS HERE current_IP: subprocess.check_output("dig +short myip.opendns.com @resolver1.opendns.com", shell=True) try: while True: if expected_IP in str(current_IP): print("IPs Match - Things are normal") else: print("Current IP: " + str(current_IP) + "\nIP NOT AS EXPECTED!") #Code to complete actions called here time.sleep(60) # Change this timer to reduce/increase time between checks (seconds) except KeyboardInterrupt: print("\nHard Exit Initiated. Goodbye!") https://github.com/Tombo1001/PyIPmonitor ...

13 December 2020 · 2 min · Tom

How to pass through a drive to a UNRAID VM

I recently migrated my ‘physical’ Windows 10 desktop to a ‘virtual’ machine running under UNRAID (libvert). This is a quick guide on how I was able to use my existing installation on a SSD and pass it through to a VM. Why passthrough a drive to a VM? In some cases, it might be beneficial to start from scratch when creating a Windows 10 VM on UNRAID, creating a new virtual disk and having a fresh install. I chose to take an alternative path because I was contempt with my Windows install as it was. I had my Steam/Epic Games library downloaded onto one of the two disks already in the system and a number of applications installed and configured just the way I like them. ...

12 December 2020 · 3 min · Tom

[FIXED] Bose Bluetooth headphones with Windows 10

I recently moved to a new Windows 10 laptop and experience a number of problems with my Bose SoundLink II, Bluetooth headphones. Fortunately, after some playing around with drivers I was able to solve my problem and this post explains how… The Problem Poor sound quality – with the default drivers, the sound quality was poor and there was a considerable amount of audible noise being delivered to the headphones via the Bluetooth interface. The audio was very lo-fi and the frequency range was dramatically reduced. This resulted in a very thin, tinny sound. ...

30 August 2020 · 2 min · Tom

How to force the Windows 10 2004 update

Note: Windows 10 mainstream support ends October 2025. If you’re on Windows 10, consider upgrading to Windows 11 rather than installing older feature updates. Are you still waiting for your Windows 10 computer to receive the 2004 update? Eager to play with WSL2 like I was? Here is how to force the windows 10 2004 update. Microsoft is staggering the over-the-air update as they usually do with new major releases. However if you are tired of hitting ‘check for updates’ in the windows 10 update settings, there is a way to press the issue: ...

4 June 2020 · 1 min · Tom

How to check if RAM is running in ECC mode

Error Correcting Code (ECC) RAM is a variation of coputer memory which helps to ilimintate data curruption or ‘bit rot’, but it is not always imediately apparent if your system memory is running in ECC mode; here is a quick guide on how to check if your system memory is running in ECC mode. This guide covers Windows and Linux systems, but please ensure that if you are running either system in a virtual machine configuration that this command is ran on the host machine. ...

30 May 2020 · 2 min · Tom

Adding WMIC command to the Windows path

Note: WMIC is deprecated as of Windows 11 22H2. For equivalent functionality use Get-WmiObject or Get-CimInstance in PowerShell instead. wmic is not recognized as an internal or external command – I was quite shocked to find that a command I use on a very regular basis was not working on a fresh installation of Windows 10 1909 on my trust old ThinkPad. I don’t want to spend hours trying to find out why this was not correct in my system path, but instead, I fixed it and spent the time sharing how to fix the problem. ...

30 May 2020 · 2 min · Tom

How To: Raspberry Pi boot from USB

The Pi enthusiasts have been waiting for official USB boot support on the Raspberry Pi for what feels like a lifetime, but finally it is on the horizon. In this post I will explain how to make your Raspberry Pi boot from USB. WARNING: Although this is official, it is still in beta testing, so rock-solid stability is far from certain. Learn more about this beta release here. ...

23 May 2020 · 4 min · Tom

Copy Paste in vSphere before installing VMware tools

I’ve spent enough time building VMs in vSphere to know that the first few minutes between starting the VM and getting VMware Tools installed is agonising. Similar to my ‘Copy Paste With Powershell Sendkeys‘ script, I have another tool written in AutoIT which sends defined keyboard strokes to the system. So this is not exactly ‘copy paste in vSphere’, but it achieves the same goal. If you actually want to enable clipboard sync between host and VM, you can follow this guide here: Enable Copy and Paste Operations Between the Guest Operating System and Remote Console. This is going to need VMware Tools installed on the host though. ...

18 May 2020 · 2 min · Tom