PDF-ShellTools > Bug reports

Windows Explorer crash always in the same directory

<< < (3/3)

RTT:
Here I leave some code to start with. Just save it to a .js file, in the same directory where you have the PDFs.
Make sure you disable the PDF-ShellTools Column Handler (you can use the manager for this one), and/or the Acrobat Column Handler "...\Common Files\Adobe\Acrobat\ActiveX\pdfshell.dll", or the code will get internal PDFs Titles too, and these don't need to be set.


--- Code: ---var WshShell = new ActiveXObject("WScript.Shell");
FMTID_SummaryInfo="{F29F85E0-4FF9-1068-AB91-08002B27B3D9}";
PID_TITLE="2";
SCID_TITLE=FMTID_SummaryInfo+" "+PID_TITLE;

function setMetadata(params) {
        //WScript.Echo( params );
        //64 bit Windows
        //WshShell.Run('"%ProgramFiles(x86)%\\PDF-ShellTools\\PDFShellTools.exe" SetMetadata ' + params, 1, true);

        //32 bit Windows
        WshShell.Run('"%ProgramFiles%\\PDF-ShellTools\\PDFShellTools.exe" SetMetadata '+params, 1, true);
    }

var objShell = new ActiveXObject("shell.application");
var objFolder2;
objFolder2 = objShell.NameSpace(WshShell.currentdirectory);
if (objFolder2 != null) {
    var FolderItems;
    FolderItems = objFolder2.Items();
    if (FolderItems != null) {
        var FolderItem;
        var Title;
        var filename;
        for (var i = 0; i < FolderItems.count; i++) {
            FolderItem = FolderItems.item(i);
            if (FolderItem.name.split('.').pop().toLowerCase() == 'pdf') {
                Title = FolderItem.ExtendedProperty(SCID_TITLE);
                if (Title) {
                    //WshShell.Popup(FolderItem.path+ '-Title:'+Title, 0, "Message", 0x30);
                    setMetadata("\"Metadata='Title=" + Title + "'\" \"" + FolderItem.path + '"');
                }
            }
        }
    }
}
--- End code ---

itsupport@aviom:
Update - I downloaded the new PDF-ShellTools version today. On the Engineer's Windows 7 64-bit desktop PC I uninstalled the old version and rebooted, then installed this new version. Two new issues now exist:

1. Editing document Titles now works ok, but simply right-clicking a folder in Windows Explorer causes it to crash.
2. When editing documents the Apply button remains greyed out even though a change has been made to the Title field. This occurs only when making the change via the Details tab; when making the change via the InfoEdit tab the Apply button is available.

I was able to repeat these issues on my 64-bit Windows 7 test laptop. Let me know if you need more info or details. And thanks again for working to resolve this.

RTT:

--- Quote ---I uninstalled the old version and rebooted, then installed this new version
--- End quote ---
You can just install it on top of the installed version.
And current installer don't even need to reboot Windows, asking user if he prefer to try restarting just the Windows Shell. May not work if the tools DLLs are in use by another, than the Shell, application.


--- Quote ---1. Editing document Titles now works ok, but simply right-clicking a folder in Windows Explorer causes it to crash.
--- End quote ---
Indeed! But it's only happening with the trial release, that's why I missed to detect it. Until the new release, you can fix it removing this key from the Windows registry.
HKEY_CLASSES_ROOT\AllFileSystemObjects\ShellEx\ContextMenuHandlers\{E3FD95C1-D5B1-4929-B0EC-C156318EDD8F}
It will only remove the possibility to select a directory to pack in a PDF package, and you can always add it from the Create/Edit PDF package tool itself.


--- Quote ---2. When editing documents the Apply button remains greyed out even though a change has been made to the Title field. This occurs only when making the change via the Details tab; when making the change via the InfoEdit tab the Apply button is available.
--- End quote ---
All fine here, and that Details tab is Windows Shell responsibility. But take note that, in this Details tab, the apply button state change only when exiting the edited field, so make sure you select another one to get that button state updated. In the PDF-ShellTools InfoEdit tab the state is update on every keystroke, so probably you are getting confused here because of the different behavior?


--- Quote ---And thanks again for working to resolve this.
--- End quote ---
I'm the one who has to thank you for take the time to report the issues.

Navigation

[0] Message Index

[*] Previous page

Go to full version