Hide installed application in Windows

By | May 17, 2024

There may be a time when you need to hide an installed application so that it will not be uninstalled. An easy way to keep an application from being uninstalled is to just hide it from appearing in Windows add/remove programs. This is easily achieved by adding the SystemComponent value DWORD in the uninstall section of the registry for that specific application.

Let’s say I want to hide the Zoom application from appearing in Windows. Currently, you can see it listed in the control panel

I can run the following powershell command to add the SystemComponent entry to the registry and set the value to 1 to hide the application:

New-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{57D6B477-1B0C-4C4B-8479-A89ACFDFD875}' -Name SystemComponent -Value 1

Now the application will no longer appear in the installed Applications section of Control panel.

To make the item visible again, just delete the SystemComponent from the registry.

Powershell .ToString()

By | April 22, 2024

I’m posting this as I spent too much time on figuring out how to convert the current IP of a machine and turn the IP address into an array. I needed this so I can change the last octet to a couple of other values that I would set later in the script. Powershell has an odd way of outputting data into different types such as objects. Objects can be frustrating when you just want a string output, but objects do give you all types of other possible information from the data you are querying.

The output of my variable $ipv4 is an object.

I mean there is quite a bit of data to choose from, but I just wanted the IP address. So, after digging around, I realized I needed to pass a PSObject .ToString() to my variable which will return the string representation for this object.

Finally! My variable only outputting the string value.

Now that I can get the actual string value I need, I can then use split(‘.’) to split the string at each period character to an array. For some reason, getting just the string value on this one stumped me longer than it should have. So, here it is for anyone that ever needs this (Or myself for future reference). Splitting your IP address into an array.

$ipV4 = (Test-Connection -ComputerName (hostname) -Count 1).IPV4Address
$ipArray =  ($ipV4.ToString()).Split(".")

Write-Host("IPV4 Output :" + $ipV4)
Write-Host("Octect1 [0] :" + $ipArray[0])
Write-Host("Octect2 [1] :" + $ipArray[1])
Write-Host("Octect3 [2] :" + $ipArray[2])
Write-Host("Octect4 [3] :" + $ipArray[3])

Replacing apt with Nala

By | April 19, 2024

Nala is an improved front-end for the apt package manager in Ubuntu/Debian Linux. It adds many features and a better visual representation to the activity of the command. A really good article about Nala can be found here at ItsFoss. There are many more features and arguments to nala than the normal apt command offers.

Nala upgrade in use.

I’ve decided to create an alias to stop me from using the apt command to using nala. To make sure the alias is persistent after every session or login, I needed to add the following alias commands to the bottom of my .bashrc file.

# Added alias for nala to be used instead of apt.
alias apt='\nala'
alias dapt='\apt'
# For aliases to work with sudo:
alias sudo='sudo '

Now save and exit the shell. Enter back into your terminal and when I run sudo apt update, I get nala running instead.

Running sudo apt upgrade runs through nala now.