Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) #15

Closed
Eastney opened this issue Nov 20, 2023 · 11 comments
Assignees
Labels
Milestone

Comments

@Eastney
Copy link

Eastney commented Nov 20, 2023

Describe the bug
Fails to work after install. Program starts, but shortly (<10s) after starting throws an unhandled exception, and closes down.

To Reproduce
Installed on windows 10 22H2, with .NET 4.8 (or higher, according to the installer)
First run of program raises the help window, per notes.

  • Created SQL DB,
  • Closed help, and the program starts,
  • Shortly after starting the unhandled error is thrown, see screenshot
    Screenshot 2023-11-20 124020.
  • program shutdown with 'OK'.

Desktop (please complete the following information):

  • OS: [e.g. Windows 10 21H1]
  • PDFKeeper Version: 8.1.2 (msi installer)

Database (please complete the following information):

  • DBMS: SQLite

Additional context
Add any other context about the problem here.
For an unhandled exception (bug), please include:

PDFKeeper.log

@Eastney
Copy link
Author

Eastney commented Nov 20, 2023

ps. program sounds great, but i would like to try it... Many thanks in advance for your time in looking into this situation.

@rffrasca rffrasca self-assigned this Nov 20, 2023
@rffrasca rffrasca added the bug label Nov 20, 2023
@rffrasca
Copy link
Owner

rffrasca commented Nov 20, 2023

The unhandled exception is occurring when creating the "PDFKeeper Upload" shortcut in the Downloads and Documents folders in the user profile. The shortcut points to "%AppData%\Robert F. Frasca\PDFKeeper\Upload" that is created automatically. During the creation of the folder is when the shortcut is created.

Can you provide a directory listing of "%APPDATA%\Robert F. Frasca\PDFKeeper"?

@Eastney
Copy link
Author

Eastney commented Nov 20, 2023

Please see attached:
blah.txt

@rffrasca
Copy link
Owner

rffrasca commented Nov 20, 2023

The "Robert F. Frasca" folder is showing as ROBERT~1.FRA in your directory listings. Is your system set to create folders in 8.3 format?

@Eastney
Copy link
Author

Eastney commented Nov 21, 2023

per your request:
"The "Robert F. Frasca" folder is showing as ROBERT~1.FRA in your directory listings. Was that folder created in 8.3 format?"

I do not believe so, but this stuff is not really my forte. To get the text file I simply used the command line to get the file structure, and that required the /X switch to find the short name. (i now see where the "8dot3" comes in... )
Inline image
Screenshot 2023-11-21 111459

@rffrasca
Copy link
Owner

Ah ok, it was the /x switch.

So, I was doing a little digging on the internet and found someone experiencing the same exact exception but, with a different application that was creating shortcuts during setup. In that case, the issue was with an anti-virus program removing the shortcut. To prove this out, open Explorer and browse to the Downloads or Documents folder, then move the explorer off to the side so you can watch it as you open PDFKeeper. Next, open PDFKeeper and let it sit for up to one minute. Within the first minute you should see the shortcut get created and possibly deleted very quickly.

@Eastney
Copy link
Author

Eastney commented Nov 21, 2023

it looks like you solved it!
Windows Defender. I went to Virus & threat protection / Protection history, changed the setting and it seems to work now.

image

@rffrasca
Copy link
Owner

I'm glad that solved it! However, I do feel that a change needs to be made to PDFKeeper to not cause Defender to delete the shortcut. I'm thinking that the shortcut in the Downloads folder can remain as the Downloads folder is not protected. The shortcut in the Documents folder can be replaced by a shortcut in the SendTo folder. I will keep this issue open and address this in a future release.

@rffrasca rffrasca changed the title first use error: "System cannot find file specified" FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) Nov 22, 2023
@rffrasca rffrasca added this to the 9.1.0 milestone Nov 23, 2023
@rffrasca
Copy link
Owner

Turns out, the SendTo folder is not a good location for the PDFKeeper Upload folder shortcut. With the shortcut in the SendTo folder, PDF's can only be added to the Upload folder, not in any of the upload profile sub-folders. In addition, PDF's can only be copied into the Upload folder through SendTo, move is not permitted.

After doing some research, I think the best location would be under Quick Access.

@rffrasca
Copy link
Owner

Pinning a folder to Quick Access only pin's the actual folder. So in Quick Access, there will be a folder named Upload not PDFKeeper Upload like the shortcut. With that, I will create the PDFKeeper Upload shortcut on the desktop.

@rffrasca
Copy link
Owner

rffrasca commented Dec 9, 2023

PDFKeeper 9.1.0 was released today.

@rffrasca rffrasca closed this as completed Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants