dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.2k stars 661 forks source link

Cannot install new version - fatal error 0x89970643 #771

Closed Mikeinnc closed 5 years ago

Mikeinnc commented 5 years ago

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

Check List

Description

Logs

Please attach in separate files: mirror output, library logs and kernel logs. In case of BSOD, please attach minidump or dump analyze output.

Mikeinnc commented 5 years ago

I was requested to update Dokan library to v1.2.2000 on my Windows 7 Ultimate 64bit system as I am using Keybase. I followed the instructions; removed the previous version using Control Panel > Programs & Features; restarted the computer and started the installation. However, it constantly fails saying 'Fatal error - installation failed because Windows reboot is still pending after Dokan driver uninstall - error 0x80070643'. Well, it's not - pending, that is! I've checked that there is NO older Dokan library installed; the 'Program Files' directory does NOT contain any directory that even remotely looks like 'Dokan'; I've rebooted (with power down) numerous times and yet consistently get this error. My guess is that something (?) is not being correctly reset when the system reboots - but what? Any assistance gratefully received!! Thanks. dokanerror

Mikeinnc commented 5 years ago

Log file for error is attached. Dokan_Library_1.2.1.2000_Bundle_20190113125256.log

Liryna commented 5 years ago

Hi @Mikeinnc ,

could you check if you have this flag in your reg set ? https://github.com/dokan-dev/dokany/blob/88e89fc447699af5ed0e671ed90d54e1d97f967c/dokan_wix/Dokan_x64.wxs#L116-L123

Mikeinnc commented 5 years ago

Hi Liryna - Thanks for the reply. No, there's no evidence of that flag at all. I ran a search on the registry for any instances of 'Dokan' - a few keys showed up (see below for an example - left over, I guess from the previous instance?) but certainly not a key in HKLM like the one you mention.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-2639430714-3830895328-605062752-1001\Components\9BF61A89413DA59408C67BD5BC47FCD9

ValueName\ValueData: 277230B7C02E1DE49903AB0396618739\21:\Software\Keybase\Keybase\KbfsDokanExe

Liryna commented 5 years ago

This is wierd because that the only way to get the error message you face: https://github.com/dokan-dev/dokany/blob/88e89fc447699af5ed0e671ed90d54e1d97f967c/dokan_wix/Dokan_x64.wxs#L178 https://github.com/dokan-dev/dokany/blob/88e89fc447699af5ed0e671ed90d54e1d97f967c/dokan_wix/Dokan_x64.wxs#L135

Mikeinnc commented 5 years ago

OK, so I thought I'd double check and make really sure that flag wasn't present. It wasn't - not in ControlSet001, ControlSet002 or CurrentControlSet. Then I powered down computer; waited 5 minutes or so (just to be sure!); powered up and tried running the 'Dokan Library 1.2.1.2000 Bundle Setup' again. Exactly the same error message. However, this time, I left the error message (and setup) dialog up on the screen, and checked my registry again. And the key was now active!! I'll add a screenshot of the keys so you can see. I then closed the setup dialog, and checked again - and the key was still there. So, did it get placed there during the setup process? It would appear so - but why wasn't it there when I looked before? Weird! Hopefully, this will enable you to advise me what to do next!! Thanks so much for your assistance - Mike

dokan_flag-enum dokan_flag

Liryna commented 5 years ago

Hi @Mikeinnc ,

This is weird. Having the service dokan driver as delete state but windows do not remove it during a reboot. I imagine you no longer have dokan software installed at all ?

Mikeinnc commented 5 years ago

Hi Liryna - Thanks for the last comment and apologies for being 'off-air' for a couple of weeks. I'm back again now, and will look further into this issue and let you know what happens. Yes, a very wierd sistuation, it appears!

Mikeinnc commented 5 years ago

Hi Liryna - Well, I have tried a few more issues. As you are probably aware, I need to update the Dokan Library to use the Keybase app in (Windows) Explorer. So, I have deleted all traces of Dokan on my computer; deleted the Keybase app and then reloaded it (as an older version). In this, an older version of Dokan gets loaded, and this appears to be successful. I've then updated Keybase and checked 'Enable Keybase in Explorer'. A this point, the dialog appears to load the new Dokan library, but then tells me I must first uninstall the older - original - version. I've done this; and restarted Windows. Now, the new Dokan library dialog opens, and starts the installation. However, whatever I do, it fails with that same error message! It seems that there's something really upsetting that Dokan library installation! Oh, Keybase works OK - it just will not allow me to 'access Keybase files like I would normally do with local files'. Regarding your last comment, you seem to be right - there's no indication in programs that there is a Dokan library loaded. However, dokan1.sys does exist in the \system32\drivers directory! Stranger and stranger.....

Liryna commented 5 years ago

@Mikeinnc Does the dokan1.sys exist even after uninstall?

Mikeinnc commented 5 years ago

Hi Liryna - I won't answer your question, because I have actually got the Dokan library 1.1.0.2000 to load!! I am still having untold problems with attempting to get it to load directly from Keybase, so I downloaded - again - the latest library setup file _DokanSetupredist.exe and this time, after rebooting etc, I ran it as an admin (Right click - run as administrator) - and it completed successfully!!! Amazing! Now the problem is that if I try to 'Enable Keybase in Explorer', Keybase, apparently, doesn't recognise that the library is loaded, and wants to reload it. Of course, it fails - even if I have run the Keybase client app as an 'Admin' (see above). I've tried removing the raw version; in fact tried just about every combination of removal; reinstalling; rebooting (multiple times!!!) but the installation will not complete successfully from Keybase. So, current situation is a successful installation of Dokan, but it is neither recognised by nor cannot be used by Keybase. Of course, I realise this is a Keybase issue and I'll see what they say...... Thanks so much for all your help - and I guess the real secret is 'run as an Administrator' in Windows"

Mikeinnc commented 5 years ago

Hi Liryna - I'm at my wits end with this, and although I opened a case in the Keybase GIT area, it seems that they are totally baffled as well. Since last writing, I have been totally unable to replicate a successful install of the Dokan library. After many, many frustrating and fruitless hours, I have discovered exactly where it is failing. During the install, it appears that the dokan_x64.msi file is written to a sub-directory in the \ProgramData\Package Cache directory, and executed from there. Except mine isn't. Ever! I have tried every trick I can think of to overcome this problem, but every install fails at this point. I even renamed the original 'Package Cache' directory, and created a new one with write permission to every man and his dog. Still failed! Here's the relevant issue from the log:

_[2464:1200][2019-01-30T10:32:25]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{3033f520-fbfd-410e-bce7-e86beb2fade3}, options: 0x7, disable resume: No [2464:1200][2019-01-30T10:32:25]i000: Caching bundle from: 'C:\Users\Mike\AppData\Local\Temp{5CF2493E-9892-4A28-AD91-84710BF202F1}.be\DokanSetup.exe' to: 'C:\ProgramData\PackageCache{3033f520-fbfd-410e-bce7-e86beb2fade3}\DokanSetup.exe' [2464:1200][2019-01-30T10:32:26]i320: Registering bundle dependency provider: {5F030BFA-CE6E-408A-9694-F593B319DBBE}, version: 1.2.1.2000 [2464:1200][2019-01-30T10:32:26]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{3033f520-fbfd-410e-bce7-e86beb2fade3}, resume: Active, restart initiated: No, disable resume: No [2464:1100][2019-01-30T10:32:27]i305: Verified acquired payload: Dokan_x64.msi at path: C:\ProgramData\Package Cache.unverified\Dokan_x64.msi, moving to: C:\ProgramData\PackageCache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokan_x64.msi. [2464:1200][2019-01-30T10:32:27]i323: Registering package dependency provider: {65A3A964-3DC3-0102-0001-181221101125}, version: 1.2.1.2000, package: Dokan_x64.msi [2464:1200][2019-01-30T10:32:27]i301: Applying execute package: Dokan_x64.msi, action: Install, path: C:\ProgramData\PackageCache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokanx64.msi, arguments: 'ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" MSIUNINSTALLSUPERSEDEDCOMPONENTS="1" INSTALLDIR="C:\Program Files\Dokan\Dokan Library-1.2.1" INSTALLDEVFILES="1"' [2464:1200][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to install MSI package. ** Looks like directory NOT writeable? *** [2464:1200][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to execute MSI package. [2AF0:2B98][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to configure per-machine MSI package.

I have another Windows 7 machine, and the Dokan library installed faultlessly on that. At the suggestion of the Keybase team, I have tried replicating the installation from the successful machine on to the failing machine, copying every known Dokan file to the respective directories. But, of course, this doesn't work (and to be honest, despite the effort - which was quite formidable - I really didn't think it would!). So that's the situation. One machine - flawless and effortless installation. The other - a total mind blowing disastrous nightmare that has wasted many, many hours of my life! Any final assistance would be gratefully received, otherwise I'll just have to accept this will never, ever work on here!

marinkobabic commented 5 years ago

Maybe you can give it a try

https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed

According to the stuff I have found so far it may be related to the last .net framework. Please try to reinstall it.

On Fri, Feb 1, 2019, 06:46 Mike Weaver <notifications@github.com wrote:

Hi Liryna - I'm at my wits end with this, and although I opened a case in the Keybase GIT area, it seems that they are totally baffled as well. Since last writing, I have been totally unable to replicate a successful install of the Dokan library. After many, many frustrating and fruitless hours, I have discovered exactly where it is failing. During the install, it appears that the dokan_x64.msi file is written to a sub-directory in the \ProgramData\Package Cache directory, and executed from there. Except mine isn't. Ever! I have tried every trick I can think of to overcome this problem, but every install fails at this point. I even renamed the original 'Package Cache' directory, and created a new one with write permission to every man and his dog. Still failed! Here's the relevant issue from the log:

*[2464:1200][2019-01-30T10:32:25]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{3033f520-fbfd-410e-bce7-e86beb2fade3}, options: 0x7, disable resume: No [2464:1200][2019-01-30T10:32:25]i000: Caching bundle from: 'C:\Users\Mike\AppData\Local\Temp{5CF2493E-9892-4A28-AD91-84710BF202F1}.be\DokanSetup.exe' to: 'C:\ProgramData\PackageCache{3033f520-fbfd-410e-bce7-e86beb2fade3}\DokanSetup.exe' [2464:1200][2019-01-30T10:32:26]i320: Registering bundle dependency provider: {5F030BFA-CE6E-408A-9694-F593B319DBBE}, version: 1.2.1.2000 [2464:1200][2019-01-30T10:32:26]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{3033f520-fbfd-410e-bce7-e86beb2fade3}, resume: Active, restart initiated: No, disable resume: No [2464:1100][2019-01-30T10:32:27]i305: Verified acquired payload: Dokan_x64.msi at path: C:\ProgramData\Package Cache.unverified\Dokan_x64.msi, moving to: C:\ProgramData\PackageCache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokan_x64.msi. [2464:1200][2019-01-30T10:32:27]i323: Registering package dependency provider: {65A3A964-3DC3-0102-0001-181221101125}, version: 1.2.1.2000, package: Dokan_x64.msi [2464:1200][2019-01-30T10:32:27]i301: Applying execute package: Dokan_x64.msi, action: Install, path: C:\ProgramData\PackageCache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokan_x64.msi, arguments: 'ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" MSIUNINSTALLSUPERSEDEDCOMPONENTS="1" INSTALLDIR="C:\Program Files\Dokan\Dokan Library-1.2.1" INSTALLDEVFILES="1"' [2464:1200][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to install MSI package. ** Looks like directory NOT writeable? *** [2464:1200][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to execute MSI package. [2AF0:2B98][2019-01-30T10:32:56]e000: Error 0x80070643: Failed to configure per-machine MSI package.*

I have another Windows 7 machine, and the Dokan library installed faultlessly on that. At the suggestion of the Keybase team, I have tried replicating the installation from the successful machine on to the failing machine, copying every known Dokan file to the respective directories. But, of course, this doesn't work (and to be honest, despite the effort - which was quite formidable - I really didn't think it would!). So that's the situation. One machine - flawless and effortless installation. The other - a total mind blowing disastrous nightmare that has wasted many, many hours of my life! Any final assistance would be gratefully received, otherwise I'll just have to accept this will never, ever work on here!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dokan-dev/dokany/issues/771#issuecomment-459613882, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHSOGLMNd8jagGVHhMJrLrA10A49tJ8ks5vI9TBgaJpZM4Z8-xM .

Mikeinnc commented 5 years ago

Thanks so much for your valued information. I was previously sent that link by the Keybase team, and to be brutally honest, it was totally useless! It found, and did, absolutely nothing and - in true MSoft style - shunted me off to 'somewhere else'. I did, out of frustration and in good faith, try it again, but nothing...... I did also look at my .net framework which is v4.7.2 and I ran a repair process on it. I then rebooted, and again tried to install Dokan. Same problem - same error. Always that same error!

[2A80:2A98][2019-02-01T16:27:41]i301: Applying execute package: Dokan_x64.msi, action: Install, path: C:\ProgramData\Package Cache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokan_x64.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" MSIUNINSTALLSUPERSEDEDCOMPONENTS="1" INSTALLDIR="C:\Program Files\Dokan\Dokan Library-1.2.1" INSTALLDEVFILES="1"' [2A80:2A98][2019-02-01T16:28:10]e000: Error 0x80070643: Failed to install MSI package.

Always fails to install the package - and, of course, everything else goes downhill after that! Why? What is stopping that install? How can dot-Net be involved? It's a very consistent failure!!!

Liryna commented 5 years ago

Hi @Mikeinnc ,

Could you try to run with the full debug log of the Dokan_x64.msi: msiexec /i Dokan_x64.msi /l*v DokanLogFile.txt

marinkobabic commented 5 years ago

Please can you run process monitor and set the file path filter to the problem directory so that we can se if there is really an access issue?

We can then also see if antivirus or some other software is preventing the installation.

On Fri, Feb 1, 2019, 09:38 Mike Weaver <notifications@github.com wrote:

Thanks so much for your valued information. I was previously sent that link by the Keybase team, and to be brutally honest, it was totally useless! It found, and did, absolutely nothing and - in true MSoft style - shunted me off to 'somewhere else'. I did, out of frustration and in good faith, try it again, but nothing...... I did also look at my .net framework which is v4.7.2 and I ran a repair process on it. I then rebooted, and again tried to install Dokan. Same problem - same error. Always that same error!

[2A80:2A98][2019-02-01T16:27:41]i301: Applying execute package: Dokan_x64.msi, action: Install, path: C:\ProgramData\Package Cache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokan_x64.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" MSIUNINSTALLSUPERSEDEDCOMPONENTS="1" INSTALLDIR="C:\Program Files\Dokan\Dokan Library-1.2.1" INSTALLDEVFILES="1"' [2A80:2A98][2019-02-01T16:28:10]e000: Error 0x80070643: Failed to install MSI package.

Always fails to install the package - and, of course, everything else goes downhill after that! Why? What is stopping that install? How can dot-Net be involved? It's a very consistent failure!!!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dokan-dev/dokany/issues/771#issuecomment-459647203, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHSOKHl-b7MIyvfjFUy-NZXhTxIyCPOks5vI_zsgaJpZM4Z8-xM .

Mikeinnc commented 5 years ago

I will, but as an aside, I use the same commercial strength 'Sophos AV' program on both computers, so I would be more than surprised if it were a problem on one and not the other. I'll let you know the results later. Thanks!

On Fri, 1 Feb 2019 at 16:51, Marinko notifications@github.com wrote:

Please can you run process monitor and set the file path filter to the problem directory so that we can se if there is really an access issue?

We can then also see if antivirus or some other software is preventing the installation.

On Fri, Feb 1, 2019, 09:38 Mike Weaver <notifications@github.com wrote:

Thanks so much for your valued information. I was previously sent that link by the Keybase team, and to be brutally honest, it was totally useless! It found, and did, absolutely nothing and - in true MSoft style

shunted me off to 'somewhere else'. I did, out of frustration and in good faith, try it again, but nothing...... I did also look at my .net framework which is v4.7.2 and I ran a repair process on it. I then rebooted, and again tried to install Dokan. Same problem - same error. Always that same error!

[2A80:2A98][2019-02-01T16:27:41]i301: Applying execute package: Dokan_x64.msi, action: Install, path: C:\ProgramData\Package Cache{65A3A964-3DC3-0102-0001-181221101125}v1.2.1.2000\Dokan_x64.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" MSIUNINSTALLSUPERSEDEDCOMPONENTS="1" INSTALLDIR="C:\Program Files\Dokan\Dokan Library-1.2.1" INSTALLDEVFILES="1"' [2A80:2A98][2019-02-01T16:28:10]e000: Error 0x80070643: Failed to install MSI package.

Always fails to install the package - and, of course, everything else goes downhill after that! Why? What is stopping that install? How can dot-Net be involved? It's a very consistent failure!!!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dokan-dev/dokany/issues/771#issuecomment-459647203, or mute the thread < https://github.com/notifications/unsubscribe-auth/ADHSOKHl-b7MIyvfjFUy-NZXhTxIyCPOks5vI_zsgaJpZM4Z8-xM

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dokan-dev/dokany/issues/771#issuecomment-459650564, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFflnFYfv9NlA18jF23SZQiPCfSi2SXks5vJAAlgaJpZM4Z8-xM .

Mikeinnc commented 5 years ago

I rebooted and ran the msiexec file and here is the log file generated (oh, and needless to say, it failed.....!)

DokanLogfile.txt

I'll run the process monitor later (after restarting, of course) and send you the details. Thanks so much for all this help!

Liryna commented 5 years ago

Part of the log where the error happen:

ExecuteInstall:  ExecuteInstall Initialized.
ExecuteInstall:  GetCustomActionData start.
ExecuteInstall:  CustomActionData="INSTALLFOLDER=C:\Program Files\Dokan\DokanLibrary-1.2.1\"
ExecuteInstall:  GetCustomActionData exit.
ExecuteInstall:  StartDokanCtlProcess with param "/i n".
ExecuteInstall:  InstallFolderPath="C:\Program Files\Dokan\DokanLibrary-1.2.1\"
ExecuteInstall:  InstallDokanctlPath="C:\Program Files\Dokan\DokanLibrary-1.2.1\dokanctl.exe /i n"
ExecuteInstall:  Create redirect pipe.
ExecuteInstall:  CreateProcess dokanctl.
ExecuteInstall:  Wait dokanctl finish...
ExecuteInstall:  GetExitCodeProcess dokanctl.
ExecuteInstall:  Read dokanctl output
ExecuteInstall:  ReadFile error: 109
ExecuteInstall:  dokanctl output : ""
ExecuteInstall:  dokanctl return an error (-1073741701)
ExecuteInstall:  Cleanup dokanctl handle.
ExecuteInstall:  StartDokanCtlProcess exit.
ExecuteInstall:  Error 0x80004005: StartDokanCtlProcess failed

https://github.com/dokan-dev/dokany/blob/master/dokan_wix/WiXCA/CustomAction.cpp#L6

Very wierd that dokanctl has no output at all. Could you check that vc redist 2017 x64 / x86 are correctly installed on your computer ? The process does not seem to be able to start correctly.

Liryna commented 5 years ago

@Mikeinnc do you think see should be closed ? had you time to look into it ?

Mikeinnc commented 5 years ago

Hi Liryna

I do apologise. I sent the following to you on 2 Feb, but as I attached a log file, it appears it didn't get sent - and I didn't notice!

(sent 02 FEB2019) Hi Liryna - It looks like you have cracked the problem! I did check the Visual C++ redistributables last night - well, I thought I did! - and they seemed to be solid, but this morning, I actually deleted them from my system, as I recalled from the "successful" other machine installation that Dokan would reinstall them if they weren't present. I rebooted, started 'process monitor' (which I'd previously set-up to filter just processes that wrote to or read from the /programdata/package cache directory) and tried an install from Keybase ( which appears to be identical to performing it directly), and sure enough, it informed me that it was reinstalling the redistributables. And then - success!!! It worked! I restarted Keybase and, as expected, the K drive is now present and shows the Keybase folders. I'll include the ProcessMonitor file in here so you can see it, (although, like me, I guess you are just pleased you can tick this one off!) but this is certainly one to remember! There had been NO indication at all that there had been anything 'wrong' with the Visual C++ redistributable files, but clearly there was. Thanks so much for all your very informative and kind assistance. It is very much appreciated!

So, yes, all is now good and it is working exactly as I would expect. Please close the issue - and again, thanks for all your help, and apologies this didn't reach you sooner!

Kind regards

Mike

PS I'm not attaching the log file this time!

On Sun, 17 Feb 2019 at 23:23, Liryna notifications@github.com wrote:

@Mikeinnc https://github.com/Mikeinnc do you think see should be closed ? had you time to look into it ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dokan-dev/dokany/issues/771#issuecomment-464469923, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFflpbA2cuBdwmDi3CS-6fZbBXDcKZCks5vOXPmgaJpZM4Z8-xM .

Liryna commented 5 years ago

@Mikeinnc Thanks a lot for the feedback. Glad that we succeeded to find the reason at the end! :)

0lm commented 4 years ago

Hello. I got the exact same Error. When uninstalled DOkan 1.3, I cancled reboot to reboot/turn off PC later. Later I turned it off, went to sleep, and then next day tried to install Dokan 1.4 but it gave me "reboot from previous uninstallation pending".

And I actually do have stil this Reg Key. ( Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\dokan1) DeleteFlag is set to 1 (Hexadecimal). Do i need to set it to 0?

Hi @Mikeinnc ,

could you check if you have this flag in your reg set ?

https://github.com/dokan-dev/dokany/blob/88e89fc447699af5ed0e671ed90d54e1d97f967c/dokan_wix/Dokan_x64.wxs#L116-L123

tomato3107 commented 4 years ago

Currently you need to reboot Windows after uninstalling the service. That is a hard requirement.

In your case the solution would be to uninstall Dokan 1.4, reboot and THEN install again. (The hope is you don't have to clean the registry manually.)

@Liryna: An improvement might be possible for this using the method ServiceInstaller.Uninstall https://docs.microsoft.com/en-us/dotnet/api/system.serviceprocess.serviceinstaller.uninstall or by calling the utility "sc.exe".

Liryna commented 4 years ago

@tomato3107 I agree with what you said in the need to reboot but I am not sure to follow about the link which is about dotnet services.

tomato3107 commented 4 years ago

I am not sure how that would work with the Win32 API functions (https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-deleteservice). It says there the service is only marked for deletion but that deletion will actually be executed on restart by the SCM.

Liryna commented 4 years ago

@tomato3107 Yes that already the case IIRC. The filesystem is always used and cannot be unregistered until windows reboot. We cannot do much about it.

@0lm do the files did not remove by itself after the reboot?

tomato3107 commented 4 years ago

Maybe dokanctl should at least check if a reboot is still pending after uninstalling a previous version before it executes DokanServiceInstall.

Liryna commented 4 years ago

@tomato3107 Normally, if you start the new installer you should have a message telling you a reboot is pending. https://github.com/dokan-dev/dokany/blob/master/dokan_wix/Dokan_x64.wxs#L135 That should already be enough, dokanctl will only be run after all the check from installer pass.

tomato3107 commented 4 years ago

I forgot that was there, thanks.