📜 VBScript (WSH)

Check "Enable Win32 Long Paths" Status (VBScript)

Reads the registry value behind the "Enable Win32 Long Paths" tweak to confirm whether it's applied.

By WindowsScripting.com · 691 B
CheckEnableLongPathsStatus.vbs
' ============================================================
' CheckEnableLongPathsStatus.vbs
'
' Checks whether "Enable Win32 Long Paths" is currently applied.
'
' Usage: cscript CheckEnableLongPathsStatus.vbs
' ============================================================

Option Explicit

Dim objShell, currentValue
Set objShell = CreateObject("WScript.Shell")

On Error Resume Next
currentValue = objShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled")

If Err.Number <> 0 Then
    WScript.Echo "'LongPathsEnabled' is not set (using the Windows default)."
Else
    WScript.Echo "Current value of 'LongPathsEnabled': " & currentValue
End If
On Error Goto 0