dokany icon indicating copy to clipboard operation
dokany copied to clipboard

Error Installing version 2.1.0.1000

Open lbr77 opened this issue 1 year ago • 17 comments

Feature request can skip this form. Bug report must complete it. Check List must be 100% match or it will be automatically closed without further discussion. Please remove this line.

Environment

  • Windows version:
  • Processor architecture:
  • Dokany version:
  • Library type (Dokany/FUSE):

Check List

  • [x] I checked my issue doesn't exist yet
  • [x] My issue is valid with mirror default sample and not specific to my user-mode driver implementation
  • [x] I can always reproduce the issue with the provided description below.
  • [x] I have updated Dokany to the latest version and have reboot my computer after.
  • [x] I tested one of the last snapshot from appveyor CI

Description

Failed Installing Dokan Library for many times. It shows up the error 0x80070643,but checking the Install Log I can't decide what to do.

Logs

Here's Log. Dokan_Library_2.1.0.1000_Bundle_20240130125757_000_Dokan_x64.msi.log

lbr77 avatar Jan 30 '24 05:01 lbr77

Hi @lbr77 , Thanks for the logs. Seems like somehow the driver is already installed on the system. Was it manually install previously maybe ? dokanctl output : "DokanServiceInstall: Service (Dokan2) is already installed

Liryna avatar Jan 31 '24 01:01 Liryna

Hi, I also get the same 0x80070643 error trying to install via .exe or .msi. I tried installing via the .exe first, but did not have the "DokanServiceInstall: Service (Dokan2) is already installed" message in my logs, so I tried the .msi package and I now get the same error and message you posted above. I am able to reinstall 2.0.6.1000 without any issues but if I uninstall 2.0.6.1000 and try to install 2.1.0.1000 I get the 0x80070643 error.

Please see my logs attached. Dokan_Library_2.1.0.1000_Bundle_20240201140437_000_Dokan_x64.msi.log

I can see dokan2.sys located in C:\Windows\System32\drivers\ even after an uninstall, but what is the best way to clean this up and reinstall? I assume this is why the error is occurring. image

dfirsec-au avatar Feb 01 '24 03:02 dfirsec-au

Hi, I was able to rectify the issue, I had to manually delete the registry entry - HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\dokan2 then reboot. Once that was complete I was able to delete dokan2.sys from C:\Windows\System32\drivers\ and successfully install 2.1.0.1000.

dfirsec-au avatar Feb 01 '24 04:02 dfirsec-au

Hi, I was able to rectify the issue, I had to manually delete the registry entry - HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\dokan2 then reboot. Once that was complete I was able to delete dokan2.sys from C:\Windows\System32\drivers\ and successfully install 2.1.0.1000.

The registry should be deleted automatically at next reboot. The registry key stays present as long as the driver is loaded and because it is marked for deletion, it will be removed along with the registry key at next reboot.

You always need to reboot after having uninstalled Dokan driver before you can install it again.

LTRData avatar Feb 01 '24 09:02 LTRData

Hi LTRData, I did reboot after uninstall and before attempting to install 2.1.0.1000 but the issue persisted. The only way to resolve it was the steps I followed above, I am not sure why but it stayed there until I manually removed the registry entry and driver.

dfirsec-au avatar Feb 01 '24 11:02 dfirsec-au

Hi LTRData, I did reboot after uninstall and before attempting to install 2.1.0.1000 but the issue persisted. The only way to resolve it was the steps I followed above, I am not sure why but it stayed there until I manually removed the registry entry and driver.

Are you sure that you really rebooted and not just shut down and boot up again?

LTRData avatar Feb 01 '24 14:02 LTRData

Yes I rebooted and not just shut down

dfirsec-au avatar Feb 01 '24 14:02 dfirsec-au

Yes I rebooted and not just shut down

Okay. Not sure what happened then. I have not seen that exact behavior during any tests. It usually just work after reboot.

LTRData avatar Feb 01 '24 15:02 LTRData

Hi, I was able to rectify the issue, I had to manually delete the registry entry - HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\dokan2 then reboot. Once that was complete I was able to delete dokan2.sys from C:\Windows\System32\drivers\ and successfully install 2.1.0.1000.

Thanks,that really works!

lbr77 avatar Feb 01 '24 16:02 lbr77

Hum I agree with @LTRData , it should just work. If this can be repro, that would be nice to investigate but otherwise I don't know what we can do here.

Liryna avatar Feb 02 '24 02:02 Liryna

I have the same problem, I installed both DokanSetup.exe and DokanSetupDbg.exe. I am not sure if installing both of them causes this problem.

algj avatar Feb 17 '24 02:02 algj

I wasn't aware you could install both at the same time 😮 We shouldn't allow that. Can you share your install logs ?

Liryna avatar Feb 17 '24 04:02 Liryna

Oh, that's crazy - I tried it on a brand new Windows 11 VM and install has failed! Sadly, I do not have the old logs since I have deleted the Win10 VM :(

I failed to install 2.1.0.1699 (from appveyor) on a brand new Windows 11 (Tiny11) install - got 0x80070643 error: Dokan_Library_2.1.0.1699_Bundle_20240217193853_000_Dokan_x64.msi.log

I immediately tried to install 2.1.0.1000 after failure with 1699 and had an error too.

algj avatar Feb 17 '24 17:02 algj

This is normal the driver from appveyor is signed with a debug certificate. See the wiki how to enable debug cert drivers on the vm

Liryna avatar Feb 17 '24 18:02 Liryna

This is normal the driver from appveyor is signed with a debug certificate. See the wiki how to enable debug cert drivers on the vm

My mistake! :sweat_smile: What is weird that I'm unable to install version 2.1.0.1000 from GitHub Releases... I have a suspicion that it's because I tried to install the driver with a debug certificate, which may have left the drivers partially installed. On my previous W10 VM the installation problems have started when I tried to install signed with a debug cert too. Screenshot_20240217_202306

Dokan_Library_2.1.0.1699_Bundle_20240217203226_000_Dokan_x64.msi.log

ExecuteInstall:  dokanctl output : "DokanServiceInstall: Service (Dokan2) is already installed
Driver install failed
Driver path: 'C:\Windows\system32\drivers\dokan2.sys'
Installing driver...
"
ExecuteInstall:  dokanctl return an error (1)

algj avatar Feb 17 '24 18:02 algj

Yes if you have manually installed a driver somehow, or replaced the driver sys file with another file and then uninstalled the package, then the driver file with be left in place and will cause future setup packages to fail. If you have manually installed or replaced the driver sys file, you need to first remove it (or rename it if it cannot be removed) and use sc delete dokan2 and reboot to remove the driver registration from registry.

LTRData avatar Feb 17 '24 19:02 LTRData

That really makes sense!! Thank you, it worked @LTRData! I guess that means if you try to install dokany and it fails to install, it will continue failing...

algj avatar Feb 17 '24 19:02 algj