Fix VB registry entries to prevent ~ character when opening files by double-clicking them

Top  Previous  Next

The Fix VB registry entries to prevent ~ character when opening files by double-clicking them feature fixes the problem described in MSDN Knowledge Base article Q149863: "PRB: Long Filenames Lost when Project is Loaded by Association", which is partially reproduced here:

SYMPTOMS

Visual Basic for Windows 32-bit project long filenames are converted to short filenames when run by association under Microsoft Windows 95, Windows 98, Windows Me, Windows NT, or Windows 2000. Running by association is invoked by double-clicking on a file in Windows Explorer.

CAUSE

If the fully qualified path to vb32.exe contains any long filenames (for example: C:\Program Files\Microsoft Visual Basic\Vb32.exe) when a project is loaded by association from Windows Explorer, Visual Basic uses the short filename to load the project. The short filename appears on the Visual Basic design environment title bar.

RESOLUTION

  • From the Explorer View/Options dialog box, select the File Types tab. In the Registered File Types list box, select Visual Basic Project, and click on the Edit button. In the Actions list box of the Edit File Type dialog box, select open, then click the Edit button. In the Application used to perform action field, put quotation marks (" ") around the path to Vb32.exe as follows:

"C:\Program Files\Microsoft Visual Basic\Vb32.exe" "%1"

  • Click OK to save the change.

Visual Basic now loads the project using its correct long filename. The add-in performs automatically the fix in the registry with the "open" action each time is loaded.

Remarks:

  • This feature is not available in the VBA version of MZ-Tools.