Bill-Stewart / SyncthingWindowsSetup

Syncthing Windows Setup
Mozilla Public License 2.0
1.26k stars 54 forks source link

Uninstaller (current user) does not work #24

Closed jzpt closed 7 months ago

jzpt commented 7 months ago

Running syncthing 1.27.4, I cannot uninstall: after starting it up, uninstaller keeps hanging on 0%

image

Task Manager shows nothings happening either image

Bill-Stewart commented 7 months ago

Sorry, I am not able to reproduce this. I would recommend starting the uninstaller with the /LOG parameter and check the content of the uninstaller log. Example:

C:\Users\username\AppData\Local\Programs\Syncthing\uninstall\unins000.exe /LOG=C:\Users\username\Documents\uninstall.log
jzpt commented 7 months ago

this is what came out of the log:

2024-03-29 16:45:26.982 Log opened. (Time zone: UTC+01:00) 2024-03-29 16:45:26.982 Setup version: Inno Setup version 6.2.2 2024-03-29 16:45:26.982 Original Uninstall EXE: C:\Users\~\AppData\Local\Programs\Syncthing\uninstall\unins000.exe 2024-03-29 16:45:26.982 Uninstall DAT: C:\Users\~\AppData\Local\Programs\Syncthing\uninstall\unins000.dat 2024-03-29 16:45:26.982 Uninstall command line: /SECONDPHASE="C:\Users\~\AppData\Local\Programs\Syncthing\uninstall\unins000.exe" /FIRSTPHASEWND=$F0C0E /LOG=E:\Syncthinguninstall.log 2024-03-29 16:45:26.983 Windows version: 10.0.19045 (NT platform: Yes) 2024-03-29 16:45:26.996 64-bit Windows: Yes 2024-03-29 16:45:26.996 Processor architecture: x64 2024-03-29 16:45:26.996 User privileges: None 2024-03-29 16:45:26.997 Administrative install mode: No 2024-03-29 16:45:26.997 Install mode root key: HKEY_CURRENT_USER 2024-03-29 16:45:26.997 Created temporary directory: C:\Users\~\AppData\Local\Temp\is-JVMLH.tmp 2024-03-29 16:45:27.011 -- DLL function import -- 2024-03-29 16:45:27.011 Function name: GetUserNameExW 2024-03-29 16:45:27.011 DLL name: setup:secur32.dll 2024-03-29 16:45:27.011 Skipping. 2024-03-29 16:45:27.011 -- DLL function import -- 2024-03-29 16:45:27.011 Function name: CompareVersionStrings 2024-03-29 16:45:27.011 DLL name: setup:files:UninsIS.dll 2024-03-29 16:45:27.011 Skipping. 2024-03-29 16:45:27.011 -- DLL function import -- 2024-03-29 16:45:27.011 Function name: IsISPackageInstalled 2024-03-29 16:45:27.011 DLL name: setup:files:UninsIS.dll 2024-03-29 16:45:27.011 Skipping. 2024-03-29 16:45:27.011 -- DLL function import -- 2024-03-29 16:45:27.011 Function name: UninstallISPackage 2024-03-29 16:45:27.011 DLL name: setup:files:UninsIS.dll 2024-03-29 16:45:27.011 Skipping. 2024-03-29 16:45:27.011 -- DLL function import -- 2024-03-29 16:45:27.011 Function name: FindProcess 2024-03-29 16:45:27.011 DLL name: files:ProcessCheck.dll 2024-03-29 16:45:27.011 Skipping. 2024-03-29 16:45:27.011 Message box (Yes/No): Are you sure you want to completely remove Syncthing and all of its components? 2024-03-29 16:45:29.241 User chose Yes. 2024-03-29 16:45:29.389 Exec: "C:\Users\~\AppData\Local\Programs\Syncthing\stctl.exe" --stop -q 2024-03-29 16:45:29.389 Exec exit code: 0

Bill-Stewart commented 7 months ago

The next step after running stctl.exe is to remove the Syncthing firewall rule, which will provoke a UAC prompt if the uninstaller is not elevated. Please try removing the firewall rule manually before performing the uninstall with logging:

https://github.com/Bill-Stewart/SyncthingWindowsSetup/?tab=readme-ov-file#removing-the-firewall-rule-manually

Bill-Stewart commented 7 months ago

You can also check whether the firewall script hangs. Sample command:

C:\Windows\system32\cscript.exe "C:\Users\username\AppData\Local\Programs\Syncthing\SyncthingFirewallRule.js" /test
jzpt commented 7 months ago

I've entered the test command and it seems to hang

cmd_oGDxTn49Wv

Bill-Stewart commented 7 months ago

Naturally, there's the problem. Perhaps you have an anti-malware program or something similar that's interfering with the WSH host. As I said, I can't reproduce it.

jzpt commented 7 months ago

I exited the malware-program, temporarily disabled the firewall, and the uninstaller still hangs

Bill-Stewart commented 7 months ago

Does this happen only on a single computer or on more than one computer?

jzpt commented 7 months ago

I only use SyncThing on my Windows desktop and Steam Deck, and my installation is different on the latter.

Bill-Stewart commented 7 months ago

There's something blocking cscript.exe and/or wscript.exe from running, possibly. I don't know what that could be, as I can't reproduce it. Once you fix that problem (whatever it is), you should be good to go.

jzpt commented 7 months ago

Any way to bypass whatever it is cscript and wscript are supposed to do or to just uninstall the program manually. I am not good at this, I have tried everything I can personally thing of and it just doesn't work.

Bill-Stewart commented 7 months ago

The uninstall consists of removing the Windows Firewall rule, the scheduled task (if you installed it), and the installation directory.

jzpt commented 7 months ago

I've checked the Windows Firewall with Advanced Security console and I can't find a Syncthing rule there and I don't seem to have a scheduled task, so if I deleted the installation directory I should be good?

Bill-Stewart commented 7 months ago

Yes

Bill-Stewart commented 7 months ago

Closing as not reproducible

Bill-Stewart commented 7 months ago

Closing as not reproducible