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

Can't remove: Setup Wizard Ended Prematurely #923

Closed katcherw closed 4 years ago

katcherw commented 4 years ago

Environment

Check List

Description

I am testing reinstalling Dokany, but have somehow gotten into a situation where I can't remove without an error. I think I might have cancelled the remove before it was complete. When using the msi package to uninstall, or using Add/Remove programs, I get the following error:

Dokan Library 1.4.0.1000 (x64) Setup Wizard ended prematurely because of an error. Your system has not been modified. To install this program at a later time, run Setup Wizard again. Click the Finish button to exit the Setup Wizard.

I ran the uninstall using msiexec, and saw the following lines in the log (full log is attached):

MSI (s) (3C:60) [11:47:33:349]: Note: 1: 1725 MSI (s) (3C:60) [11:47:33:349]: Note: 1: 2205 2: 3: Error MSI (s) (3C:60) [11:47:33:349]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1725 MSI (s) (3C:60) [11:47:33:349]: Note: 1: 2205 2: 3: Error MSI (s) (3C:60) [11:47:33:349]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1709 MSI (s) (3C:60) [11:47:33:349]: Product: Dokan Library 1.4.0.1000 (x64) -- Removal failed.

MSI (s) (3C:60) [11:47:33:350]: Windows Installer removed the product. Product Name: Dokan Library 1.4.0.1000 (x64). Product Version: 1.4.0.1000. Product Language: 1033. Manufacturer: Dokany

MSI (s) (3C:60) [11:47:33:367]: Deferring clean up of packages/files, if any exist MSI (s) (3C:60) [11:47:33:367]: MainEngineThread is returning 1603

I rebooted multiple times, but it doesn't help. And I can't install again because it says it is already installed. Also, I manually executed dokanctl /r d and dokanctl /r n, but that did not help.

How can I recover from this situation?

msi.log

Liryna commented 4 years ago

Hi @katcherw ,

What doesdokanctl /r n display ? Try to run dokanctl.exe /i n that reinstall the network provider and see if it will work or if you get another error which might happen depending where the previous uninstall was stopped.

katcherw commented 4 years ago

@Liryna

PS C:\Program Files\dokany> .\dokanctl.exe /r d Driver path: 'C:\Windows\system32\drivers\dokan1.sys' Removing 'Dokan1'... DokanServiceCheck: Failed to open Service (Dokan1). error = 1060 'Dokan1' removed. PS C:\Program Files\dokany> .\dokanctl.exe /r n Driver path: 'C:\Windows\system32\drivers\dokan1.sys' network provider remove ok PS C:\Program Files\dokany> .\dokanctl.exe /i n Driver path: 'C:\Windows\system32\drivers\dokan1.sys' network provider install ok

I retried uninstalling via the msi package, but I get the same error.

Liryna commented 4 years ago

@katcherw Ok try .\dokanctl.exe /i n and .\dokanctl.exe /i d and then try to uninstall

katcherw commented 4 years ago

@Liryna

PS C:\Program Files\dokany> .\dokanctl.exe /i n Driver path: 'C:\Windows\system32\drivers\dokan1.sys' network provider install ok PS C:\Program Files\dokany> .\dokanctl.exe /i d Driver path: 'C:\Windows\system32\drivers\dokan1.sys' Installing driver... DokanServiceInstall: Service (Dokan1) installed DokanServiceControl: Service (Dokan1) started DokanServiceInstall: Service (Dokan1) started Driver installation succeeded!

Same error:

MSI (s) (74:5C) [19:45:57:879]: Note: 1: 1725 MSI (s) (74:5C) [19:45:57:879]: Note: 1: 2205 2: 3: Error MSI (s) (74:5C) [19:45:57:879]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1725 MSI (s) (74:5C) [19:45:57:880]: Note: 1: 2205 2: 3: Error MSI (s) (74:5C) [19:45:57:880]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1709 MSI (s) (74:5C) [19:45:57:880]: Product: Dokan Library 1.4.0.1000 (x64) -- Removal failed.

MSI (s) (74:5C) [19:45:57:880]: Windows Installer removed the product. Product Name: Dokan Library 1.4.0.1000 (x64). Product Version: 1.4.0.1000. Product Language: 1033. Manufacturer: Dokany

MSI (s) (74:5C) [19:45:57:889]: Deferring clean up of packages/files, if any exist MSI (s) (74:5C) [19:45:57:889]: MainEngineThread is returning 1603

Liryna commented 4 years ago

That part of the log does not have the reason of the failure. Could you relaunch the commands to be sure dokan is correctly installed and then retry to uninstall with the full log?

If /I d fails, you will need to reboot and retry probably

katcherw commented 4 years ago

I reran installing driver and network successfully:

PS C:\Program Files\dokany> .\dokanctl.exe /i d Driver path: 'C:\Windows\system32\drivers\dokan1.sys' Installing driver... DokanServiceInstall: Service (Dokan1) installed DokanServiceControl: Service (Dokan1) started DokanServiceInstall: Service (Dokan1) started Driver installation succeeded! PS C:\Program Files\dokany> .\dokanctl.exe /i n Driver path: 'C:\Windows\system32\drivers\dokan1.sys' network provider install ok

Attaching logs with error: msi.log

Liryna commented 4 years ago

@katcherw wait does dokan is installed in C:\Program Files\dokany or C:\Program Files\DokanLibrary-1.4.0 ? If it is C:\Program Files\dokany, that normal C:\Program Files\DokanLibrary-1.4.0\dokanctl.exe cant be excuted

katcherw commented 4 years ago

Yes, it is installed in c:\program files\dokany. I tried copying c:\Program Files\dokany to c:\Program Files\DokanLibrary-1.4.0, but I get the same problem. Logs attached.

msi.log

Liryna commented 4 years ago

@katcherw How did you first got it installer in the dokany folder?

katcherw commented 4 years ago

I programatically installed from the msi package using the Win32 MsiInstallPackage API. I was experimenting installing and removing silently.

Liryna commented 4 years ago

@katcherw What is weird is that the env variable set by the installer were not targeting the dokany folder. I tried to reproduce by using the exe installer and set a dokany path like you and it installed and uninstalled correctly. Event the env variables were correct.

I cannot say what happened by it might be the way the MsiInstallPackage API was used.

katcherw commented 4 years ago

Okay, thanks. Is there a way to clean it up manually? The wiki shows manual steps for installation, but not removal.

Liryna commented 4 years ago

@katcherw running dokanctl /r n and dokanctl /r d will remove the components to be active for the system. To clean files and trace installed by the msi, you will probably need another tool that will force the uninstall.

katcherw commented 4 years ago

Okay, thanks for your help.

Liryna commented 4 years ago

@katcherw I will close the ticket as it is related to how the msi was handled. Let me know if you still find we could improve something on dokan side and I will reopen the ticket!