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

Error Installing version 2.1.0.1000 #1200

Closed
5 tasks done
lbr77 opened this issue Jan 30, 2024 · 17 comments
Closed
5 tasks done

Error Installing version 2.1.0.1000 #1200

lbr77 opened this issue Jan 30, 2024 · 17 comments

Comments

@lbr77
Copy link

lbr77 commented Jan 30, 2024

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

  • I checked my issue doesn't exist yet
  • My issue is valid with mirror default sample and not specific to my user-mode driver implementation
  • I can always reproduce the issue with the provided description below.
  • I have updated Dokany to the latest version and have reboot my computer after.
  • 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

@Liryna
Copy link
Member

Liryna commented Jan 31, 2024

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

@dfirsec-au
Copy link

dfirsec-au commented Feb 1, 2024

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
Copy link

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.

@LTRData
Copy link
Contributor

LTRData commented Feb 1, 2024

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.

@dfirsec-au
Copy link

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.

@LTRData
Copy link
Contributor

LTRData commented Feb 1, 2024

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?

@dfirsec-au
Copy link

Yes I rebooted and not just shut down

@LTRData
Copy link
Contributor

LTRData commented Feb 1, 2024

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.

@lbr77
Copy link
Author

lbr77 commented Feb 1, 2024

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!

@Liryna
Copy link
Member

Liryna commented Feb 2, 2024

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.

@algj
Copy link

algj commented Feb 17, 2024

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.

@Liryna
Copy link
Member

Liryna commented Feb 17, 2024

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

@algj
Copy link

algj commented Feb 17, 2024

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.

@Liryna
Copy link
Member

Liryna commented Feb 17, 2024

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

@algj
Copy link

algj commented Feb 17, 2024

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! 😅
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)

@LTRData
Copy link
Contributor

LTRData commented Feb 17, 2024

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.

@algj
Copy link

algj commented Feb 17, 2024

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...

@Liryna Liryna closed this as completed Mar 1, 2024
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

5 participants