How to: Change icon for USB/Removable Drive/Thumb drive/USB Hard Drive

Keywords: USB, USB storage, icon, Removable Drive, USB Hard Drive, USB HDD, USB Drive, Thumb Drive

The default icon for removable drive usually looks like this:

USB Drive icon
USB Drive icon

To change it, follow these steps:

1 Download an icon in “.ico” format, you can find free icons from following websites:

https://www.flaticon.com/

https://icons8.com/

https://thenounproject.com/

https://www.iconfinder.com/free_icons

You can search on the internet for more websites

OR

You can use any picture with help from following websites to convert to “.icon” format:

https://www.zamzar.com/convert/png-to-ico/

https://convertio.co/png-ico/

https://www.icoconverter.com/

2 Connect your USB drive

3 Copy the downloaded “.ico” file to root of the USB drive (Mean do not put it into any folder inside of the USB drive )

USB root - model-craft.ico
USB root – model-craft.ico

4 Create a text file in root of USB drive

USB drive - Create a text file
USB drive – Create a text file

5 Add following text to the text file, save the file

[autorun]
ICON=iconname.ico
Text file
Text file

6 Rename the text file to autorun.inf

Rename to autorun.inf
Rename file to autorun.inf

7 Unplug the USB drive, plug the USB drive to your computer again.

8 You should see the new icon now.

USB drive with custom icon
USB drive with custom icon

Note: Fixed hard drive/Internal hard drive icons can also be changed via the same method.

Bonus:

To avoid accidental deletion, we can hide the “aurorun.inf” and “iconname.icon”.

1 Select both files

Select both files
Select both files

2 Right click on the file

3 Click on Properties

Right click on file - Click on Properties
Right click on file – Click on Properties

4 Tick “Hidden” then click on OK button.

File Properties - Read-only - OK
File Properties – Read-only – OK

How to: Fix Microsoft Outlook showing wrong contact name in “To” Field

Keywords: Microsoft Outlook, Showing wrong name, Showing wrong email address, To field, Outlook contact name and email address mismatch, Showing incorrect contact name, Microsoft Exchange, Microsoft Office 365

When entering contact’s name in the To field in Microsoft Outlook, it shows correct email address but wrong contact name which can cause confusion.

Microsoft Outlook - To Field (Wrong contact name)
Microsoft Outlook – To Field (Wrong contact name)

Solution

To resolve this issue, we need to remove incorrect “Linked contacts”

1 Click on the correct email address with incorrect name, so that it populates the name to To… field

Microsoft Outlook - To... field
Microsoft Outlook – To… field

2 Double click on the name, a menu will appear

Microsoft Outlook
Microsoft Outlook

3 Click on three dots

Microsoft Outlook
Microsoft Outlook

4 Click on “Link Contacts…”

Microsoft Outlook - Link Contacts...
Microsoft Outlook – Link Contacts…

5 Remove all other contacts except the only correct contact name for that specific contact

Before Modifying

Microsoft Outlook - Linked contacts for (Before Modifying)
Microsoft Outlook – Linked contacts for (Before Modifying)

After Modifying

Microsoft Outlook - Linked contacts for (After Modifying)
Microsoft Outlook – Linked contacts for (After Modifying)

6 Now the issue should be fixed

Note: You need to repeat these steps for each contacts which has this problem.

Linux test TCP/UDP port connectivity with nc command

TCP

# nc -z -v [hostname or IP address] [port number]
nc -z -v 192.168.100.1 443
Connection to  192.168.100.1 443 port [tcp/https] succeeded!

UDP

# nc -z -v -u [hostname or IP address] [port number]
# nc -z -v -u 192.168.100.1 123 
Connection to  192.168.100.1 123 port [udp/ntp] succeeded!

Bouns

We can also test TCP port with telnet command

telnet [hostname or IP address] [port number]
# telnet 192.168.100.1 443
Trying 192.168.100.1…
Connected to 192.168.100.1.
Escape character is '^]'.

If return “Connected to xxx.xxx.xxx.xxx”, it means the port is open and functional

If return “Trying xxx.xxx.xxx.xxx…”, it means the port is closed or not accessible.

Check NTP server working or not, Check NTP server Date and Time – Windows, Linux

Windows

1 Use Win + R to open run Window

Microsoft Windows - Run window
Microsoft Windows – Run window

2 Type cmd, then hit Enter key

Microsoft Windows - Run window - cmd.exe
Microsoft Windows – Run window – cmd.exe

The command we use is in following format:

w32tm /stripchart /computer:domainnameORipaddress /dataonly /samples:5

3 Enter following command to test “time.windows.com”

w32tm /stripchart /computer:time.windows.com /dataonly /samples:5
Microsoft Windows - CMD -   w32tm /stripchart /computer:time.windows.com /dataonly /samples:5 output
Microsoft Windows – CMD – w32tm /stripchart /computer:time.windows.com /dataonly /samples:5 output

Bonus: Other commands

1 Show the current time zone settings:

w32tm /tz

2 List external NTP servers (peers)

w32tm /query /peers
Microsoft Windows - CMD -  w32tm /query /peers output
Microsoft Windows – CMD – w32tm /query /peers output

Note! If you have encountered this error: “The following error occurred: The service has not been started. (0x80070426)”, you need to start the “Windows Time” service, you can start a elevated cmd or PowerShell by using Win + X key combination then select “Command Prompt (Admin)” or “Windows PowerShell (Admin)” then type “sc start W32Time” to start the Windows Time service or using Run window and type “services.msc” then find “Windows Time” service and start it.

3 Restore Windows Time service settings to default

C:\>net stop w32time
C:\>w32tm /unregister
C:\>w32tm /register
C:\>net start w32time

4 Re-sync Time

Resynchronize the clock as soon as possible, disregarding all accumulated error statistics. If no computer is specified, the local computer will resynchronize. The command will wait for resynchronization unless the /nowait switch is used.

w32tm /resync

5 Redirect the network configuration and Re-sync time

Force redetection of network resource before resynchronization.

w32tm /resync /rediscover
Microsoft Windows - PowerShell - w32tm /resync /rediscover output
Microsoft Windows – PowerShell – w32tm /resync /rediscover output

6 Check current NTP configuration

Show Information:

w32tm /query /status
Microsoft Windows - PowerShell -  w32tm /query /status  output
Microsoft Windows – PowerShell – w32tm /query /status output

Show Configuration:

w32tm /query /configuration
Microsoft Windows - PowerShell -  w32tm /query /configuration  output
Microsoft Windows – PowerShell – w32tm /query /configuration output

Linux

1 ntpdate -q domainnameORipaddress

ntpdate -q time.windows.com
Linux - Terminal - ntpdate -q time.windows.com output
Linux – Terminal – ntpdate -q time.windows.com output

2 ntpq -p domainnameORipaddress

ntpq -p 192.168.1.1

Cisco Aironet activate Mobility Express Mode (Switch from CAPWAP to Mobility Express Mode)

To switch from CAPWAP (Control And Provisioning of Wireless Access Points) mode to ME (Mobility Express) mode

1 Connect PC and Access Point with console cable.

2 Open Device Manager

3 Under”Ports”, find out what port is used

4 Select “Serial” and put correct port into Putty

Putty - Serial, Serial line (Port)
Putty – Serial, Serial line (Port)

5 Click on Open button from Putty

6 Default Username: “Cisco” Password:”Cisco” for console

7 Follow the prompt to change the default password and finish initial configuration or autoinstallation

8 Type enable then hit Enter key and execute following command

AP#show version

If it shows:

AP Image Type: MOBILITY EXPRESS IMAGE
AP Configuration: MOBILITY EXPRESS CAPABLE

Then continue with:

AP#ap-type mobility-express

(Note: If you are not runing Mobility express image you will need to download the correct image and then setup TFTP server then use following command to update the system)

AP#ap-type mobility-express tftp://<TFTP Server IP>/<path to tar file>

9 Wait for 10 minutes

10 Power cycle the Access Point and wait for 20 minutes.

11 Find out the IP address of the Access Point

12 Access the address from browser with the credential you have set from step 7

Now you have access to Mobility Express (See following image) rather than the simple CAPWAP page.

Cisco Mobility Express Login Page (Wireless LAN Controller)
Cisco Mobility Express Login Page (Wireless LAN Controller)

Fix Microsoft Windows USB Not Working Error Code 39

If you have encountered this Error for USB ports.

Method 1: Update USB Drivers

Try Update USB Drivers with Device Manager (devmgmt.msc)

1.1 Use Win + R to open Run window, then input devmgmt.msc to open Device Manager

Microsoft Windows - Run window
Microsoft Windows – Run window

1.2 Right click on the USB controller with issue, click on Update driver

Microsoft Windows - Device Manager - Update driver
Microsoft Windows – Device Manager – Update driver

Method 2: Reinstall USB Ccontrollers

Try to Uninstall USB controllers’ drivers then reinstall them using Device Manager (devmgmt.msc)

2.1 Follow step 1.1

2.2 Right click on the USB controller with issue, click on Uninstall device

Microsoft Windows - Device Manager
Microsoft Windows – Device Manager – Uninstall device

2.3 Click on Scan for hardware changes

Microsoft Windows - Device Manager -  Scan for hardware changes
Microsoft Windows – Device Manager – Scan for hardware changes

Method 3: Delete UpperFilters and LowerFilters from registry

3.1 Follow step 1.1 to open Run window

3.2 Enter regedit to open Registry Editor Window.

Microsoft Windows - Registry Editor Window
Microsoft Windows – Registry Editor Window

3.3 Go to following registry key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}
Microsoft Windows - Registry Editor
Microsoft Windows – Registry Editor

3.4 Delete UppFilter and LowerFilter keys. (Do not delete UpperFilter.bak and LowerFilter.bak)

3.5 Restart your computer.

3.6 It should be fixed now.

Windows Server, Windows 10 missing disk performance counter in Task Manager

To fix missing disk performance counter in Task Manager:

Windows Task Manager missing disk performance counter
Windows Task Manager missing disk performance counter
Windows Task Manager with disk performance counter
Windows Task Manager with disk performance counter

Fix

1 Use Win + X key combination to open menu, click on Windows PowerShell (Admin) to open elevated PowerShell window.

2 Close Task Manager if you have it open

3 Type following command and hit Enter Key

diskperf -y
Windows PowerShell - diskperf -y
Windows PowerShell – diskperf -y

4 Now open Windows Task Manager again, the disk performance counter should appear.

Note: To diesable it again, just repeat these steps but replace diskperf -y with diskperf -n

How to Add “X-Forwarded-For” information to Apache Web Server access log and error log

Keywords: Apache 2.4, Apache show client IP Address behind proxy, access log, error log, access.log, error.log, X-Forwarded-For

(For Apache 2.4 and newer versions)

By default, the apache access log and error log will not log “X-Forwarded-For” information, so that if the client is connecting via a proxy, the log might only contain the proxy server’s IP address.

By adding X-Forwarded-For information to log files, we will be able to tell the possible real IP address of the client.

Access Log Format

The default access log format in configuration file is

LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined

To add “X-Forwarded-For” information to the access log we just need to change it to:

LogFormat "%h %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined

Apache 2.4 logformat documentation: https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#logformat

Error Log Format

The default error log format is:

Example (default format for threaded MPMs)
ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"

To add ” X-Forwarded-For ” information to the error log we need to change it to:

ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] [%{X-Forwarded-For}i] %M% ,\ referer\ %{Referer}i"

Apache 2.4 logformat documentation: https://httpd.apache.org/docs/2.4/mod/core.html#errorlogformat