Recent Posts
Archives

Posts Tagged ‘Windows’

PostHeaderIcon The Dreaded DLL Error: How to Fix ‘vcomp140.dll Not Found’ (A Quick Fix for Image Magick Users)

Has this ever happened to you? You’re excited to run a new piece of software—maybe it’s your first time executing an image manipulation with Image Magick, or perhaps launching a new video game—and instead of success, you get a cryptic pop-up: “The program can’t start because vcomp140.dll is missing from your computer.”

Panic sets in. While this issue popped up for us specifically when running Image Magick, it’s a common problem for almost any application built using Microsoft’s development tools. Fortunately, the fix is straightforward and highly reliable.

What is vcomp140.dll, Anyway?

This file is a core component of the Microsoft Visual C++ Redistributable for Visual Studio 2015-2022. Think of it as a crucial library of instructions that certain programs need to run. If this specific file is missing, corrupted, or not properly registered, the program (like Image Magick) simply cannot initialize.

Here are the three definitive steps to get your software running again.

The 3-Step Solution: Bring Back Your Missing DLL

1. Install or Repair the Official Visual C++ Redistributable (The Best Fix)

This is the most effective solution and the one that works almost every time. We need to install the official package that contains this missing file.

  1. Navigate to the Microsoft Download Center: Search online for the “Visual C++ Redistributable latest supported downloads” on the official Microsoft website.
  2. Download BOTH Versions: This is the critical step. Even if you have a 64-bit operating system, the problematic application (like Image Magick) might be a 32-bit program. You need to install both:
    • vc_redist.x86.exe (32-bit)
    • vc_redist.x64.exe (64-bit)
  3. Install and Reboot: Run both installation files. If the package is already partially installed, the installer may offer a “Repair” option—take it! Once both installations are complete, reboot your computer. This allows the operating system to fully register the new or repaired files.

2. Run the System File Checker (SFC)

If the DLL error persists after Step 1, other related system files might be corrupted. The Windows System File Checker (SFC) tool can fix these deep-rooted issues.

  1. Open Command Prompt as Administrator: Search for CMD in the Start Menu, right-click, and choose “Run as administrator.”
  2. Execute the Command: Type the following command and press Enter:sfc /scannow
  3. Wait for the Scan: The process takes several minutes. It will scan all protected system files and replace any corrupted files with cached copies.

3. Reinstall the Problematic Application

If the error specifically occurs with one program (like Image Magick), the problem might be with that application’s installer, not Windows itself.

  1. Uninstall: Go to Windows Settings > Apps and uninstall the application completely.
  2. Reinstall: Download and run the latest installer for the application. Many installers check for and include the necessary Visual C++ Redistributable package, ensuring the dependencies are handled correctly this time.

🛑 A Crucial Warning: Avoid Third-Party DLL Sites

Please, never download vcomp140.dll (or any other DLL) from non-official “DLL download” websites.

These files are often:

  • Outdated and won’t solve the problem.
  • Corrupted or bundled with malware, posing a security risk.
  • Simply copying the file into a system folder rarely works, as the files need proper registration by the Microsoft installer.

Stick to the official Microsoft download source in Step 1 for a clean and secure fix!

I hope this guide gets you back to manipulating images with Image Magick (or whatever application was giving you trouble) in no time! Let me know in the comments if this worked for you.

PostHeaderIcon 🛑 DNS Hijacked? Why Your Windows Network Settings Keep Changing to `127.0.2.2` and `127.0.2.3`

If you’ve manually set a specific DNS server (like 10.0.0.1 or 8.8.8.8) only to find it automatically revert to 127.0.2.2 and 127.0.2.3 after a reboot or network event, your system is not broken—it’s being actively managed by a third-party application.

This behavior is a very strong indicator that specialized security, VPN, or filtering software is running on your system, forcing all DNS queries through a local proxy for protection or routing purposes.


🔍 What Does 127.0.2.2 and 127.0.2.3 Actually Mean?

These addresses are intentionally set by a specific type of software and are not standard addresses distributed by your router.

  • Loopback Addresses: The entire 127.0.0.0/8 range (from 127.0.0.1 up to 127.255.255.255) is reserved for loopback or localhost. Any traffic sent to these addresses never leaves your computer; it simply “loops back” to a service running on the same machine.
  • Local DNS Proxy: The applications that cause this create a specialized local DNS server (a proxy) that listens on these specific addresses on your Windows machine.
  • Forced Interception: By setting your network adapter’s DNS to these loopback IPs, the software ensures that every single DNS request is first intercepted and processed by its local proxy before being securely forwarded over a tunnel (like a VPN) or filtered.
  • Reversion is Intentional: When you manually change the DNS, the controlling program detects the change and automatically reverts the settings to the 127.0.2.2 addresses to maintain control over your DNS traffic.

🚨 Common Culprits for this DNS Reversion

While any DNS-altering security application can cause this, the 127.0.2.2 and 127.0.2.3 addresses are particularly associated with the following categories of software:

  • Cloudflare WARP (or WARP+): This is the most common culprit. WARP uses these exact addresses to route your traffic through its secure DNS tunnel.
  • Web Filtering or Parental Control Software: Apps like CovenantEyes or corporate/school security clients often use a local DNS proxy to enforce content filtering or policy rules.
  • Advanced Antivirus/Security Suites: Some high-end security tools can install DNS-level protection to block malicious domains.
  • VPN Clients: Certain VPN clients may use a similar local DNS strategy to prevent DNS leaks.

🛠 How to Fix and Prevent the DNS Change

To successfully set your DNS to your desired address (like 10.0.0.1), you must first disable or completely remove the application that is actively controlling your DNS.

Solution 1: Identify and Disable the Application (The Primary Fix)

The quickest solution is to look for, pause, or quit the known conflicting software.

  1. Check the System Tray: Look for icons related to Cloudflare WARP, VPN clients, or parental control apps. Disconnect or Exit the program entirely.
  2. Use netstat to Find the Listener (Advanced):
    1. Open PowerShell or Command Prompt as an Administrator.
    2. Run the command: netstat -a -b
    3. Review the output (which may take a moment) and look for a process name associated with UDP port 53 (the standard DNS port). The executable name will tell you exactly what service is running the local DNS proxy.

Solution 2: Perform a Clean Boot

If you can’t easily identify the program, performing a Clean Boot can help isolate it:

  1. Press Windows Key + R, type msconfig, and press Enter.
  2. Go to the Services tab, check the box for Hide all Microsoft services, and then click Disable all.
  3. Go to the Startup tab, click Open Task Manager, and then Disable all non-Microsoft programs.
  4. Restart your PC.
  5. If the DNS settings no longer revert, you have confirmed that one of the disabled programs was the culprit. Re-enable them one by one (restarting after each) until the issue reappears to pinpoint the specific program.

Once the controlling application is disabled or uninstalled, you should be able to set and save your network adapter’s DNS address without it being automatically reverted.

PostHeaderIcon Windows IP Helper Service (IPHLPSVC): Why Network Pros Restart It for WSL 2

The IP Helper service, formally known as IPHLPSVC, is a silent, critical workhorse within the Windows operating system. While it maintains the integrity of fundamental network configurations, it is often the first component targeted by network administrators and developers when troubleshooting complex connectivity issues, particularly those involving virtual environments like WSL 2 (Windows Subsystem for Linux 2). Understanding its functions and its potential for interference is key to efficient network diagnostics.


What is the IP Helper Service?

The IP Helper service is a core Windows component responsible for managing network configuration and ensuring seamless connectivity across various network protocols. It serves several vital functions related to the Internet Protocol (IP) networking stack:

  • IPv6 Transition Technologies: The service is primarily responsible for managing and tunneling IPv6 traffic across IPv4 networks. This is achieved through mechanisms such as ISATAP, Teredo, and 6to4.
  • Local Port Control: It provides essential notification support for changes occurring in network interfaces. Furthermore, it manages the retrieval and configuration of localized network information.
  • Network Configuration Management: IPHLPSVC assists in the retrieval and modification of core network configuration settings on the local computer.

The WSL 2 Connection: Why IP Helper Causes Headaches

While essential for Windows, the deep integration of IPHLPSVC into the network stack means it can cause intermittent conflicts with virtualized environments like WSL 2. Developers frequently target this service because it often interferes with virtual networking components, leading to issues that prevent containers or services from being reached.

1. Conflict with NAT and Virtual Routing 💻

WSL 2 runs its Linux distribution inside a lightweight virtual machine (VM). Windows creates a virtual network switch, relying on Network Address Translation (NAT) to provide the VM with internet access. IPHLPSVC manages core components involved in establishing these virtual network interfaces and their NAT configurations. If the service becomes unstable or misconfigures a component, it can disrupt the flow of data across the virtual network bridge.

2. Interference from IPv6 Tunneling ⛔

The service’s management of IPv6 transition technologies (Teredo, 6to4, etc.) is a frequent source of conflict. These aggressive tunneling mechanisms can introduce subtle routing conflicts that undermine the stable, direct routing required by the WSL VM’s network adapter. The result is often connection instability or intermittent routing failures for applications running within the Linux instance (e.g., Docker or Nginx).

3. Resolving Stuck Ports and Port Forwarding Glitches 🛠️

When a service runs inside WSL 2, Windows automatically handles the port forwarding necessary to expose Linux services (which live on an ephemeral virtual IP) to the Windows host. This process can occasionally glitch, resulting in a port that appears blocked or unavailable. Restarting the IP Helper service is a common diagnostic and remedial step because it forces a reset of these core networking components. By doing so, it compels Windows to re-evaluate and re-initialize local port settings and network configuration, often clearing the blockage and restoring access to the virtualized services.


Troubleshooting: Diagnosing and Fixing IPHLPSVC Conflicts

When facing connectivity issues, especially after using WSL or Docker, troubleshooting often involves systematically resetting the network components managed by the IP Helper service.

1. Inspection Tools (Run as Administrator)

Use these native Windows tools to diagnose potential conflicts:

  • netsh: The primary command-line tool for inspecting and configuring IPv6 transition tunnels and port forwarding rules. Use netsh interface Teredo show state to check Teredo’s operational status.
  • netstat -ano: Used to inspect active ports and determine if a service (or a stuck process) is holding a port hostage.
  • ipconfig /all: Essential for verifying the current IPv4/IPv6 addresses and adapter statuses before and after applying fixes.

2. Fixing Persistent Conflicts (Disabling Tunneling)

If you suspect the IPv6 transition technologies are causing instability, disabling them often provides the greatest stability, especially if you do not rely on native IPv6 connectivity.

Run these commands in an Elevated Command Prompt (Administrator):

REM --- Disable Teredo Protocol ---
netsh interface Teredo set state disabled

REM --- Disable 6to4 Protocol ---
netsh interface ipv6 6to4 set state disabled

REM --- Restart IPHLPSVC to apply tunnel changes ---
net stop iphlpsvc
net start iphlpsvc

3. Fixing Port Glitches (Restarting/Resetting)

For port-forwarding glitches or general networking instability, a full stack reset is the last resort.

  • Immediate Fix (Service Restart): If a service running in WSL is unreachable, a simple restart of IPHLPSVC often clears the NAT table entries and port locks:
    Restart-Service iphlpsvc
  • Aggressive Fix (Stack Reset): To fix deeper corruption managed by the IP Helper service, reset the TCP/IP stack:
    netsh winsock reset
    netsh int ip reset
    ipconfig /flushdns

    ❗ Mandatory Step: A full system reboot is required after running netsh int ip reset to finalize the changes and ensure a clean network stack initialization.


Summary: A Key Diagnostic Tool

Restarting the IP Helper service is an efficient first-line diagnostic technique. It provides a means to reset core Windows networking behavior and virtual connectivity components without resorting to a time-consuming full operating system reboot, making it an invaluable step in troubleshooting complex, modern development environments.

PostHeaderIcon Script to clean WSL and remove Ubuntu from Windows 11

Here is a fully automated PowerShell script that will:

  1. Unregister and remove all WSL distros

  2. Reset WSL to factory defaults

  3. Optionally reinstall WSL cleanly (commented out)

⚠️ You must run this script as Administrator

# =====================================================
# WSL Full Reset Script for Windows 11
# Removes all distros and resets WSL system features
# MUST BE RUN AS ADMINISTRATOR
# =====================================================

Write-Host "`n== STEP 1: List and remove all WSL distros ==" -ForegroundColor Cyan

$distros = wsl --list --quiet
foreach ($distro in $distros) {
    Write-Host "Unregistering WSL distro: $distro" -ForegroundColor Yellow
    wsl --unregister "$distro"
}

Start-Sleep -Seconds 2

Write-Host "`n== STEP 2: Disable WSL-related Windows features ==" -ForegroundColor Cyan

dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

Start-Sleep -Seconds 2

Write-Host "`n== STEP 3: Uninstall WSL kernel update (if present) ==" -ForegroundColor Cyan
$wslUpdate = Get-AppxPackage -AllUsers | Where-Object { $_.Name -like "*Microsoft.WSL2*" }
if ($wslUpdate) {
    winget uninstall --id "Microsoft.WSL2" --silent
} else {
    Write-Host "No standalone WSL kernel update found." -ForegroundColor DarkGray
}

Start-Sleep -Seconds 2

Write-Host "`n== STEP 4: Clean leftover configuration files ==" -ForegroundColor Cyan
$paths = @(
    "$env:USERPROFILE\.wslconfig",
    "$env:APPDATA\Microsoft\Windows\WSL",
    "$env:LOCALAPPDATA\Packages\CanonicalGroupLimited*",
    "$env:LOCALAPPDATA\Docker",
    "$env:USERPROFILE\.docker"
)
foreach ($path in $paths) {
    Write-Host "Removing: $path" -ForegroundColor DarkYellow
    Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $path
}

Write-Host "`n== STEP 5: Reboot Required ==" -ForegroundColor Magenta
Write-Host "Please restart your computer to complete the WSL reset process."

# Optional: Reinstall WSL cleanly (after reboot)
# Uncomment the lines below if you want the script to also reinstall WSL
<# 
Write-Host "`n== STEP 6: Reinstall WSL ==" -ForegroundColor Cyan
wsl --install
#>

PostHeaderIcon Start Mule ESB as an NT service under a Windows server

Case

You would like to start a Mule ESB instance as an NT service, under a Windows server. You would also like to give a specific name and description

Fix

  • add an environment variable MULE_HOME, with value the path of Mule install, for instance: C:\jonathan\mule-standalone-3.0.1
  • edit the file %MULE_HOME%\conf\wrapper.conf
  • replace the following properties default values:
    [java]wrapper.ntservice.name=%MULE_APP%
    wrapper.ntservice.displayname=%MULE_APP_LONG%
    wrapper.ntservice.description=%MULE_APP_LONG%[/java]
  • (you can also set other properties related to NT service configuration)
  • launch the command:
  • [java]%MULE_HOME%\bin\mule.bat install -config %MULE_HOME%\bin\mule-conf.xml[/java]

  • then you can see in the administration services that the service has started
  • to remove the service, only launch the following command
  • [java]%MULE_HOME%\bin\mule.bat remove[/java]

Known issue:

On certain installations (among them the servers on which CygWin is installed), a conflict may happen between the files %MULE_HOME%\bin\mule (standard launcher for Unix and Linux) and %MULE_HOME%\bin\mule.bat (standard launcher for Windows). In this case, rename %MULE_HOME%\bin\mule as %MULE_HOME%\bin\mule.OLD

PostHeaderIcon sljava.dll / IntelliJ IDEA / ActivIdentity

Case

The administrators tried to install ActivIdentity on my desktop. Then I rebooted my computer and launched IntelliJ IDEA 8.1.4 as usual.
IDEA froze. I tried to launch former versions (8.0, 7.5.4), with the same result. Then I launched the idea.bat (available in the same folder as the idea.exe), setting echo on, to have a little more logs.

Stacktrace

[java]Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: \Program Files\ActivIdentity\SecureLogin\sljava.dll[/java]

Complete stacktrace

[java]C:\Program Files\JetBrains\IntelliJ IDEA 8.1.4\bin>"C:\win32app\Java\jdk1.6.0_01\jre\bin\java.exe" "
-Xms256m" "-Xmx1024m" "-XX:MaxPermSize=140m" "-Xbootclasspath/p:../lib/boot.jar " "-ea" -Xbootclassp
ath/a:../lib/boot.jar -cp "..\lib\bootstrap.jar;..\lib\util.jar;..\lib\jdom.jar;..\lib\log4j.jar;.
.\lib\extensions.jar;..\lib\trove4j.jar;C:\win32app\Java\jdk1.6.0_01\lib\tools.jar" com.intellij.ide
a.Main
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:126)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: \Program Files
\ActivIdentity\SecureLogin\sljava.dll
at java.lang.Runtime.load0(Runtime.java:767)
at java.lang.System.load(System.java:1005)
at com.actividentity.sso.javasso.SSOLoginScriptRunner.(SSOLoginScriptRunner.java:905
)
at com.actividentity.sso.javasso.ConsoleLogger.(Logger.java:54)
at com.actividentity.sso.javasso.Logger.(Logger.java:73)
at com.actividentity.sso.javasso.awt_swing.JavaSSOHook.(JavaSSOHook.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:773)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:861)
at java.awt.Window.getToolkit(Window.java:1127)
at java.awt.Window.init(Window.java:369)
at java.awt.Window.(Window.java:407)
at java.awt.Frame.(Frame.java:402)
at java.awt.Frame.(Frame.java:367)
at javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1731)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1808)
at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1673)
at com.intellij.idea.MainImpl.b(MainImpl.java:8)
at com.intellij.idea.MainImpl.a(MainImpl.java:79)
at com.intellij.idea.MainImpl.start(MainImpl.java:73)
… 6 more
ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:126)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: \Program Files
\ActivIdentity\SecureLogin\sljava.dll
at java.lang.Runtime.load0(Runtime.java:767)
at java.lang.System.load(System.java:1005)
at com.actividentity.sso.javasso.SSOLoginScriptRunner.(SSOLoginScriptRunner.java:905
)
at com.actividentity.sso.javasso.ConsoleLogger.(Logger.java:54)
at com.actividentity.sso.javasso.Logger.(Logger.java:73)
at com.actividentity.sso.javasso.awt_swing.JavaSSOHook.(JavaSSOHook.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:773)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:861)
at java.awt.Window.getToolkit(Window.java:1127)
at java.awt.Window.init(Window.java:369)
at java.awt.Window.(Window.java:407)
at java.awt.Frame.(Frame.java:402)
at java.awt.Frame.(Frame.java:367)
at javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1731)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1808)
at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1673)
at com.intellij.idea.MainImpl.b(MainImpl.java:8)
at com.intellij.idea.MainImpl.a(MainImpl.java:79)
at com.intellij.idea.MainImpl.start(MainImpl.java:73)
… 6 more
ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
java.lang.AssertionError: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:49)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:56)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:130)
at java.lang.Thread.run(Thread.java:619)[/java]

Explanation and Fix

I ran other Java applications, such as Eclipse and Mule ESB. The result was the same.

When you look at the stacktrace, you can see that sun.reflect.NativeConstructorAccessorImpl.newInstance0 calls com.actividentity.sso.javasso.awt_swing.JavaSSOHook. This makes me think ActivIdentity intercepts Java calls, even of very low level, and checks them before executing them. I don’t know if compiled code of JRE’s jars is modified, or if some methods are inserted through a mechanism similar to AOP. Anyway, the fact is that ActivIdentity is always called, even though I doubt a lot that original HotSpot was designed to do so…

I tried to uninstall ActivIdentity, this had no effect. I looked in Windows regedit but I found nothing. I tried also to check the value of java.library.path which, for Windows, points to Windows’PATH environment variable.

Therefore, the only solution I found to fix the issue was to changed the JAVA_HOME parameter (more accurately: the parameter IDEA_JDK) from one JDK to another, in my case: from 1.6.0_01 to 1.6.0_18)

PostHeaderIcon How to reboot or shutdown Windows?

Use following commands:

  • to shutdow: shutdown -s -t 0 -f
  • to reboot: shutdown -r -t 0 -f