Skip to content

[UI] double clicking mounted drive doesn't open it #873

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

Closed
mrx23dot opened this issue Jan 16, 2022 · 9 comments
Closed

[UI] double clicking mounted drive doesn't open it #873

mrx23dot opened this issue Jan 16, 2022 · 9 comments
Labels

Comments

@mrx23dot
Copy link

I mount something to a new drive
double click new drive.

Expected behavior

It should explore to drive, as it did with TrueCrypt.
This is the intuitive workflow.

Observed behavior

Does nothing out of the box

Steps to reproduce

  1. mount a new drive
  2. double click it

Screenshots

Please tell us more about your environment
VeraCrypt version:** 1.24-Update7

Operating system and version: win7

System type: x64

@mrx23dot mrx23dot added the bug label Jan 16, 2022
@idrassi
Copy link
Member

idrassi commented Jan 16, 2022

Please try latest 1.25.7 version and it should work. There was a change in previous version 1.25.4 that addressed similar issue encountered by users running with administrative privileges.

@mrx23dot
Copy link
Author

Just tested 1.25.7, still doesnt work.
Also right click->open does nothing.
When I type V: into start menu it opens correctly.
I run vera as admin.

@idrassi
Copy link
Member

idrassi commented Jan 16, 2022

I can't reproduce this issue in any of my Windows 7 machines with different configurations (UAC enabled/disable, VeraCrypt executed using "run as administrator", VeraCrypt executed normally).
Also other Windows 7 users on the forums don't have this issue especially on 1.25.8.

A new security mechanism was put in place in order to protect again a certain type of attacks but it seems to fails on your system.
This security mechanism was put in place for the opening of documentation HTML files and it is used also when opening drive letters since they both use the same function.

Are you using a modified Windows Shell? Do you any other customization of Windows in place?
Does the menu "Help -> Beginner's Tutorial" open a web browser window?

One possibility is to exclude opening drive letters from this security mechanism.

@mrx23dot
Copy link
Author

"Help -> Beginner's Tutorial" doesn't do anything.
Tested on my win10 too, fails same way.
I might have some restrictive regedit mod, like script executions are disabled.
.html is associated with notepad for me. (start C:\tmp\test.html in cmd opens notepad, which is fine)

Is there a log for VeraCrypt to see what fails?
How can I reproduce it from cmd.exe ? What it tries to execute?
When I type "c:" into cmd it does nothing, when I type it into "Run" it opens it.
Opening works in TrueCrypt.

I do have ConEmu as a second cmd.exe, but it works parallel, it's only a wrapper for cmd.exe. No other windows mods.
When I type "C:\Program Files\VeraCrypt\docs\VeraCrypt User Guide.chm" into ConEmu it opens the help.

@idrassi
Copy link
Member

idrassi commented Jan 17, 2022

Thank you for all these details.
I will need your help to understand what part of the code is failing and since there are no logs in VeraCrypt, I have prepared a test program that uses the same code as in VeraCrypt to open URLs and locations and in which I have added various logs.

The idea is to run the program from cmd.exe using the same credentials and the same elevation as you use with VeraCrypt.
Example of usage from an elevated command prompt: TestSafeOpen https://veracrypt.fr

TestSafeOpen_VeraCrypt

I'm attaching below the binary of TestSafeOpen. The binary is signed with the same certificate as VeraCrypt and the zip also contains its PGP signature using VeraCrypt official key.
I'm attaching also its source code if you want to build it yourself.

Please share the output of program like in the screenshot above in order to find the location of the failure.

Thank you for your help.

src_TestSafeOpen.zip
bin_TestSafeOpen.zip

@mrx23dot
Copy link
Author

Thanks for the support.
Yeah a log file would compromise privacy.

This is what I get on win10:
2022-01-18 09_17_34-Cmder

@idrassi
Copy link
Member

idrassi commented Jan 27, 2022

Thank you for sharing these results. They enabled me to finally understand the problem.
The problem is your side is caused by the fact that the Secondary Logon Service is disabled! This is not the default on Windows and I suspect that you have disabled as part of some specific configuration or some software that you installed has disabled it.

Anyway, I have implemented a fallback solution that works in such cases and I'm attaching a new binary and its source that implement it.
Can you please test again and confirm that it works this time?
Thank you for your help.

bin_TestSafeOpen2.zip
src_TestSafeOpen2.zip

@mrx23dot
Copy link
Author

Nice catch! I have non essential services disabled, since we are in the security field.

TestSafeOpen.exe "c:\Program Files"

Test VeraCrypt new SafeOpen function. By Mounir IDRASSI (c) 2022

Windows Version: Major = 10, Minor = 0, Build = 18363

SafeOpenURL: szUrl = c:\Program Files
SafeOpenURL: hShellWnd is valid
IsUacSupported = FALSE

SafeOpenURL: Falling back to ShellExecuteW because conditions of use not satisfied...
SafeOpenURL: ShellExecuteW succeeded.

Works great! Cheers

@idrassi
Copy link
Member

idrassi commented Feb 20, 2022

This has been fixed in version 1.25.9.

@idrassi idrassi closed this as completed Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants