MSI install ended prematurely

Keep getting “Setup Wizard ended prematurely because of an error” when trying an MSI install.

First tried via PowerShell: msiexec /i TwingateWindowsInstaller.msi /qn

Removed /qn switch to see what was going on.

Getting this window:

Twingate 1.0 2023-06-13 at 12.57.52 PM.31 23340 Setup & Downloads

hi @mitchatavail,

what version of Windows are you trying to deploy the Client on?

Windows 11 22H2 (x64), fully patched.

It actually does install, despite that error, when I spin up a new fully patched VM to test. :man_shrugging:

thanks @mitchatavail, strange indeed. I’ll pas the info to our QA team in case they can reproduce.

I had the same issue: Using a console with admin privileges will allow for the install, but the client doesn’t seem to work then (win10 at my side). See Headless Win10 client won't connect

Did you ever get this resolved? I am facing the same issure with both the exe and MSI on a windows 10 laptop with the latest Windows Updates installed. All I Can see in the logs is that the service failed to respond in time.

Was this ever resolved? We are facing the same issue here at my company. We have Windows 10 22H2 machines fully patched. We also ran this command for the msi install msiexec /i “[path]\TwingateWindowsInstaller.msi” /L*V “[path]\twingate.log” and the log is below:

=== Verbose logging started: 9/18/2023 11:18:47 Build type: SHIP UNICODE 5.00.10011.00 Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (78:4C) [11:18:47:755]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (c) (78:4C) [11:18:47:755]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (c) (78:B4) [11:18:47:766]: Resetting cached policy values
MSI (c) (78:B4) [11:18:47:766]: Machine policy value ‘Debug’ is 0
MSI (c) (78:B4) [11:18:47:766]: ******* RunEngine:
******* Product: .\TwingateWindowsInstaller.msi
******* Action:
******* CommandLine: **********
MSI (c) (78:B4) [11:18:47:768]: Machine policy value ‘DisableUserInstalls’ is 0
MSI (c) (78:B4) [11:18:47:775]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 3: 2
MSI (c) (78:B4) [11:18:47:775]: Note: 1: 1324 2: . 3: 1
MSI (c) (78:B4) [11:18:47:775]: MainEngineThread is returning 2
=== Verbose logging stopped: 9/18/2023 11:18:47 ===

We have done these troubleshooting steps:

  1. Ran install as Administrator
  2. Ensured the Windows Installer Service is enabled
  3. Clear the Temp folder
  4. Re-Register VBScript.dll and the Windows Installer Service
  5. Turn On .NET Framework 3.5 and 4.8

Hey folks :wave:

Unfortunately, we don’t have a complete solution for all users experiencing this issue of installation ending prematurely. For some, the below works a charm and not at all for others.

  • Uninstall the Client

  • Open regedit and review entries in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles and look for any Twingate Profiles, and delete them

    • Note that this is a sensitive task, and you must click into individual profiles to verify the ProfileName value is Twingate before deleting. Deleting the incorrect NetworkProfile is dangerous.
  • Open CMD As Administrator, and run: mofcomp %windir%\system32\wbem\cimwin32.mof (per this KB)

  • Restart

  • Reinstall the latest Client

  • Verify the service, per this KB

If this fails to resolve the issue, we may want for folks to submit a support ticket via help.twingate.com so that we can review Event Viewer logs, per:

We would be looking for Application events, that speak to potential .NET related errors, or otherwise. Please be mindful of sharing sensitive PII that EV logs might elevate here in this public space.

The above steps worked for me, Thanks Neth!

1 Like

it didt work for me, did anyone has a solution?
Windows 11 fully patched

1 Like

When you say it didn’t work for you, do you mean that you attempted installing the latest client version and the client ended with the Setup Wizard ended prematurely message?

Could you let us know if you attempted to install with the MSI or the EXE?

Also curious if you happen to be running any AV software at all on the system.

Hello Guys,

I was also facing the same problem.

    • Uninstall the Client
  • Open regedit and review entries in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles and look for any Twingate Profiles, and delete them
  1. Open CMD As Administrator, and run: mofcomp %windir%\system32\wbem\cimwin32.mof
  2. Uninstall ‘TAP windows twingate’ from control panel because even if entire twingate is not able to be installed, it does install this network adapter app.
  3. Restarted the pc.

Tried above steps several times but failed.

But then after following these steps, I did following :

  1. Installed CCleaner
  2. Ran It
  3. Restart PC
  4. Boom, Finally Twingate installation was successful. (FYI, I used exe latest version)

Premature ending of certain application is general error which can be caused by any windows .NET based applications. There are certain residuals which you can’t remove manually. It’s easy to use app lik CCleaner which does a better job of cleaning the residuals.

Windows 11 (latest update)

1 Like

I have the same issue on an older install of Windows 10 LTSC x64 Version 1809 (OS Build 17763.5206) and tried all the methods described here including the latest ccleaner portable to wipe temp files and clean the registry.

I also ran microsoft’s netfxrepairtool and removed and reinstalled .net 3.5 & 4.7 from windows features.

Eventviewer windows application logs show multiple errors with twingate service, including:

Failed to check the code signing certificate for the assembly: C:\Program Files\Twingate\Microsoft.AspNetCore.Http.dll
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: Access is denied.
at Internal.Cryptography.Pal.CertificatePal.FromBlobOrFile(ReadOnlySpan`1 rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
at System.Security.Cryptography.X509Certificates.X509Certificate…ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags)
at Twingate.Client.Shared.CertificateTrustChecker.VerifyAuthenticodeSignature(String assemblyLocation, String allowedSubject, String allowedThumbprint)

I’m giving up and trying wiresock vpn gateway for windows desktop. I already abandoned tailscale because the last time I tried it the exit node was so slow it was unusable for me, even for simple web browsing (connecting directly and not through relays).

I need to use my home network IP by running a VPN server (exit node) off my Windows 10 laptop in the USA to connect remotely from my laptop (VPN client) in India.

I also have a clean install of the latest Windows 10 x64 LTSC Version 21H2 (OS Build 19044.3803) on another laptop which I was able to install twingate just fine on.

@vanavata,

Just to be clear, you’re manually installing the MSI version of the Client, not the EXE? Also I assume you’re on an administrator account and have pre-installed the .NET 6 Core runtime, as that’s what the newest versions of our Client requires (since sometime in the summer I believe)?

We recommend installing the EXE version in every case except where you’re doing managed deployments via a MDM such as Intune or ManageEngine or something similar. In those cases the MDM app would handle the deployment of .NET 6 as well as our Client, using admin level privileges. Otherwise if the user is handling it themselves then the EXE is the best solution as it comes bundled with the proper .NET runtime.

Greetings Ben and many thanks for your reply.

I tried both the MSI and EXE with the same problem. I have tried reinstalling the .EXE multiple times after my attempts to repair the problem. I suspect something in the Windows registry.

Yes, I’m logged in with an administrator account and ran that installer exe with admin privileges.

I also downloaded and installed the latest .NET 6 core runtime in addition to reinstalling the built-in .NET runtimes from Windows Features and running the .NET repair tool provided by microsoft.

Any other suggestions are most welcome, I’d really like to give twingate a go.

Kind Regards,
Steve

Solved. I was able to resolve my issue by running msconfig (system configuration) and selecting “normal startup”.

I also removed / disabled other VPN Windows Applications & Services, namely PIA & Brave VPN.

2 Likes