Search This Blog

Friday, November 4, 2022

Registry: Modifying the context menu

Whenever you are right-clicking in your explorer or on your desktop you bring out what is called the context menu.

After doing some research and testing I found ways to add programs of my liking to this menu by editing the registry.

In this example, I used pestudio, a program that you can investigate .exe-files with. You can download it from this page for free. I wanted to add this program to the menu in order to open other files with it.

Step one is to navigate to HKEY_CLASSES_ROOT\*\shell\ 

Then you create a subkey called whatever you want the menu to display, such as "Open with PE". Within this key you then create another key called command, and this is something you do regardless of what program you are going to add.

Step two is to edit the default file located in "command". Set the value to the file path within quotation marks, followed by space, followed by %1 in quotation marks. For example:

"C:\Program Files (x86)\pestudio\pestudio.exe" "%1"

Step three is to add an icon. Enter the parent key this time, by clicking on "Open with PE". Within this key you create a string named Icon with the file path as data. Make sure to put a comma and a 0 at the end to retrieve the built in icon:

Now you should be able to see the icon, the menu name and the program you linked should be able to open the files that you right click.

If you want to turn this into a .reg-file you can use this code:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open with PE\command]
"(Default)"="\"C:\Program Files (x86)\pestudio\pestudio.exe\" \"%1\""

[HKEY_CLASSES_ROOT\*\shell\Open with PE]

"Icon"="C:\Program Files (x86)\pestudio\pestudio.exe,0"


Thursday, November 3, 2022

Registry: Customize Windows 10

The registry in Windows keeps track of many program specific settings that you make changes to. In some way it is where the state of many things gets documented

You can change settings either through the regular Windows 10 GUI, or in the registry. Always be careful when editing within the registry itself.

To change settings through the registry you can either use "regedit.exe", use .reg-files or by using PowerShell. PowerShell gives you the ability to browse and edit like any other file structure.
 

Registry Editor (regedit.exe)

Regedit.exe takes you to a registry browser, that shows you what looks like folders and files. The top level of the registry contain HKEY_CURRENT_USER for example which is a "hive". The structure with folders under the hives are keys and subkeys respectively. The things looking like files are the values that have names and types.
 


Using .reg-files

The .reg-files use a simple syntax, they will add the "folders" that doesn't already exist and then they add the key with the desired value.
 
Create a notepad .txt file, enter code and rename it to .reg afterwards. You get a clickable and shareable file. 
 

 
Below is an example on how to disable Bing search in your Windows 10 start menu. Syntax looks like this:
 
Windows Registry Editor Version 5.00
 
[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"DisableSearchBoxSuggestions"=dword:00000001 
 
The first part is what version of regedit your OS runs, then a necessary blank line, followed by an entry (hive, key, subkeys). It is possible to stack multiple edits in one file.

Another tweak I use to take me to the login page right away is the following:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization]
"NoLockScreen"=dword:00000001 
 
To show seconds in the clock on Windows 10 I use this tweak:
 
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowSecondsInSystemClock"=dword:00000001

Editing the registry with PowerShell

Using PowerShell to edit the registry is shown in this blog post I made earlier. The essential cmdlet that you work with is New-ItemProperty  
 
Followed by various parameters:
-path, where in the registry
-name the key/folder
-PropertyType whether it is a string or dword for example
-Value if there is text or perhaps a 1

Last but not least, in order for most things to take effect, you need to restart your computer.

Monday, October 24, 2022

Photography: Updating Nikon D3300 Firmware

Yesterday I had done some photography for an event and a random thought crossed my mind. "Even a niche device like a DSLR uses firmware, I wonder if there is firmware for this old camera..."

A quick search led me to an official guide on the Nikon page for the D3300 camera, in which they explain the steps.

A short summary follows:

1. Accept the terms and download the software to an empty folder and run the .exe file. This will create a .bin file within a folder called "D3300Update"


 

2. Place the .bin file on a separate, formatted, SD card


 

3. Put the SD card in your Nikon D3300, turn the camera on and press the menu button. Navigate to the firmware settings and start the update. For me the update took around 1-2 minutes. You can then turn the camera off when it tells you to and enter your regular SD card for example.

Sunday, October 16, 2022

Tech: Buying used devices

It should come as no surprise that the macro economical situation is getting bad, the economy is a cyclic creature.

When times are tough we have to look over our spending, so I decided to look into the second hand market for electronics. These are the lessons learned.

Buying a computer was a great choice, I got a high quality computer for a decent price. This is true for the docking station as well. 

One of my latest purchases was a smartphone, so far so good, but I'm not completely migrated to it just yet. I had to buy a different case with more slots for credit cards and the like. I also got a HP Elitebook 2540p today and I'm testing it out.

When you buy electronics there are some points you need to consider.

Is the product in good physical shape?
Dents and scratches doesn't affect performance, but cracks on the screen, damaged cables or batteries will definitely lower the quality of the usage experience.

Could it be infected with harmful software? 
At least reset the operative system through a clean reinstall. You don't know what computer skills the previous owner had nor what software has been installed. If you have the opportunity you might even want to format disks and change SSD.

Is the seller trustable?
This goes along with point number two, as well as your physical safety. Make sure to perform the purchase safely and screen the seller a bit so you know who you are dealing with.

So far my second hand computers, tablets and phone has proven to meet the expectations. With a bit of love you can often maintain the devices, just do some research on the device models to see if the manufacturer still releases updates and if there are spare parts.