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

No existing files or folders are passed in a command line. #27

Open
user-566 opened this issue Jul 21, 2024 · 5 comments
Open

No existing files or folders are passed in a command line. #27

user-566 opened this issue Jul 21, 2024 · 5 comments
Assignees

Comments

@user-566
Copy link

Background:

I recently got a new NAS and couldn't add tags to any of the folders on it, even though everything was still working fine for local files. The app would seemingly not even launch without giving an error message or anything. When I checked the GitHub, that's when I realized I was using an old version of the app (1.2.4.0) and that many improvements to the app were made since, so I updated to the latest version (1.8.1.0)

Actual issue

Upon installing the latest version of the app, I was now getting this error message when trying to add a tag to a folder on my NAS (everything still worked fine for local files though):
image
When checking existing issues to see if I was the only one experiencing this problem, issue #12 caught my eye. Ever since installing the app a couple years ago I've always had the UAC prompt and didn't think much of it, but according to your comment it should not be appearing anymore since version 1.4.1.0.

The fix

Just like @OLCadlywydd originally suggested, I checked the "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" registry key, only to find there was already an entry for InTag that was probably added during (re)installation:
image
Just for testing I changed the value to "~ RunAsInvoker" instead of "~ RUNASADMIN", and to my surprise, everything seems to work now.
image

Theories

Keep in mind I'm very much a beginner programmer and I have no idea how this app works so this might be useless info, but here are some things that might be of note in my setup:

  • I am still running Windows 10 22H2, not Windows 11
  • As you can see from the screenshots, I have InTag installed on my D:\ drive instead of the usual C:\ drive
  • My new NAS is running ZFS instead of the standard NTFS (which also supports extended attributes so in theory it shouldn't change anything, but I thought I'd point it out)

Conclusion

I'm not exactly sure why changing the value of the registry entry to "~ RunAsInvoker" seems to fix my problem. I can replicate the original issue by changing it back to "~ RUNASADMIN", and weirdly enough like I said it only seems to be a problem when tagging files on my NAS.

I'd be more than happy to help with further testing if needed, so please let me know if there's anything I can do!

@user-566
Copy link
Author

Some additional info I thought I'd add:

  • Even though the error says "No existing files or folders are passed in a command line" I am not using the newly-added CLI option, I'm using the right click menu entry as I've always done.
  • The behaviour does persist between reboots of both my local machine and the NAS, it really seems to just be the registry entry affecting it which is immediate.

@Jamminroot
Copy link
Owner

That is a good find, really appreciate it.
I'll have a look at it sometime soon, shouldn't be too hard to reproduce it, I think (except for ZFS though); I imagine that's due to network access (samba or "//", or whatever it's called, not exactly sure).

@Jamminroot Jamminroot self-assigned this Jul 21, 2024
@Jamminroot
Copy link
Owner

For the "in a command line" part - that's a rudiment. I'll adjust the wording.

@Jamminroot
Copy link
Owner

Also, could you check, if deleting keys
HKEY_CLASSES_ROOT\*\shell\InTag, HKEY_CLASSES_ROOT\Folder\shell\InTag and abovementioned entry in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers, and then re-installing the app fixes the problem on your side?
Also, for UAC part, what level you have it on atm?

@user-566
Copy link
Author

user-566 commented Jul 21, 2024

Hey, thanks for the quick response!
I deleted the following keys as asked HKEY_CLASSES_ROOT\*\shell\InTag, HKEY_CLASSES_ROOT\Folder\shell\InTag and HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers, then ran the "intag --uninstall" command to uninstall InTag.

I then reinstalled the app by running it as administrator from the file explorer:
image

Weirdly enough, the keys in HKEY_CLASSES_ROOT\*\shell\InTag and HKEY_CLASSES_ROOT\Folder\shell\InTag are back after the reinstall, but the entry in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers is not. But even with it not there the app does seem to work normally.

If I add it again manually with "~ RUNASADMIN" as the value, I get the weird buggy behaviour with the UAC prompt and the app not showing, but if I edit it to "~ RunAsInvoker" (or delete it) everything works normally with no UAC prompt.

Seems like the fix might just be to delete the value in the install registry script, or make sure it's set to "~ RunAsInvoker" (I'm assuming it was set to "~ RUNASADMIN" in an earlier version of the app?).

As for the UAC, I have it set to this setting, which I believe is the default:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants