Page MenuHomePhabricator

Display "Print with DirPrn" in folder doesn't display in context menu in File Explorer
Closed, ResolvedPublic

Description

Thanks Bill W:

the box checked "Display "Print with DirPrn" in folder etc - I have it checked and it's not showing up

I've confirmed that on Windows 10 v1709 on my machine it does not work. This used to work for me before the Creators Update in November (I think)

Event Timeline

Joe created this task.Feb 1 2018, 3:36 PM
Joe created this object in space S5 Public.
Joe created this object with visibility "Public (No Login Required)".
Joe added a comment.Apr 14 2019, 8:45 AM

Peter [[ https://helpdesk.karenware.com/scp/tickets.php?id=516 | wrote to support@karenware.com ]]that he added an entry himself from scratch using this program:

I am running WIN 10 (latest version)
I have found a solution to this problem.
I have downloaded and installed "Easy Context Menu v1.6" which allows for extensive customization to all types of explorer context menus including adding your directory printing utility. I have found this utility as well as your directory printing utility to be very useful.

Joe added a comment.Apr 15 2019, 12:05 PM

Doh! A user-mode application requires elevation to put new keys into HKEY_CLASSES_ROOT, of course. It's failing silently.

Joe added a comment.EditedApr 15 2019, 12:38 PM

Ok, so a user can add context menu items to his/her own profile under for example:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Print with DirPrn ...

DirectoryPrinter needs to add and remove keys there and not be messing with CLASSES_ROOT directly.

Joe added a comment.Apr 15 2019, 12:46 PM

The installer script was already wiping every possible Folder\shell location on un-install. I added Disk\shell (gonna turn that back on) for v5.4.3.

        DeleteRegKey HKCR "Folder\shell\Print with DirPrn ..."
	DeleteRegKey HKCR "Disk\shell\Print with DirPrn ..."
	DeleteRegKey HKLM "SOFTWARE\Classes\Folder\shell\Print with DirPrn ..."
	DeleteRegKey HKLM "SOFTWARE\Classes\Disk\shell\Print with DirPrn ..."
	DeleteRegKey HKCU "SOFTWARE\Classes\Folder\shell\Print with DirPrn ..."
	DeleteRegKey HKCU "SOFTWARE\Classes\Disk\shell\Print with DirPrn ..."
Joe added a comment.Apr 15 2019, 1:02 PM
Private Sub AddContext()
    Dim Cmd As String
    Dim Result As REG_ERROR

    Cmd = vbQuote & App.Path & "\" & App.EXEName & """ ""%1"""
    
    Result = Reg.WriteValue("", Cmd, "SOFTWARE\Classes\Folder\shell\" & CONTEXTMNU & "\command", HKEY_CURRENT_USER)
    
    
    If Result <> ERROR_SUCCESS Then
        MsgBox ("Unable to add folder context menu entry: " & Reg_Error_String(Result))
        Exit Sub
    End If
    
    Result = Reg.WriteValue("", Cmd, "SOFTWARE\Classes\Drive\shell\" & CONTEXTMNU & "\command", HKEY_CURRENT_USER)
    
    If Result <> ERROR_SUCCESS Then
        MsgBox ("Unable to add drive context menu entry: " & Reg_Error_String(Result))
        Exit Sub
    End If
End Sub