AJLeuer / GHelper

18 stars 7 forks source link

Security Certificate #2

Open Ihjop opened 2 years ago

Ihjop commented 2 years ago

Hello!

The Security Certificate lapsed on 2022-04-14

AJLeuer commented 2 years ago

Hi, Thanks for letting me know.

Unfortunately I don't really have a solution right now. I'm not gonna spend hundreds every year to distribute a free app.

Ultimately Microsoft needs to fix the situation. They can't just restrict WinUI development to developers that can afford a cert. There needs to be a way to distribute an unsigned WinUI app.

jgranto commented 2 years ago

You have options for people to use install.ps1 as I see it:

  1. Leave the product as is, forcing people to change the date pre-expiration, install the script, then change the date back. -or-
  2. Remove the cert altogether. Microsoft does not force people to use certs. You can configure PowerShell to run scripts without certs with one simple command. Anyone who writes their own scripts (like me) does not use certs, and has this configured already.

So, perhaps consider option 2?

tsids commented 2 years ago

Hi @AJLeuer, Is it possible for you to remove the certificate requirement?

joshieecs commented 1 year ago

I just wanted to report that I was able to install the package from powershell with the -AllowUnsigned parameter set.

Add-AppXPackage '.\GHelper (Package)_1.2.1.0_x64.msixbundle' -AllowUnsigned

Just make sure you have the Windows App Runtime installed for your architecture first. The latest release .zip of GHelper has a package for each architecture in the Dependencies folder, e.g. Microsoft.WindowsAppRuntime.1.0.msix.

edit: I had a hard time understanding how the Windows App Runtimes were supposed to be installed manually, then it occurred to me that installing the WinUI 3 Gallery sample application from the Microsoft Store would take care of them with one click.

Crunchbits commented 1 year ago

I just wanted to report that I was able to install the package from powershell with the -AllowUnsigned parameter set.

Add-AppXPackage '.\GHelper (Package)_1.2.1.0_x64.msixbundle' -AllowUnsigned

I'm not very powershell literate, but I have been struggling to get that command to work and keep getting the following error: Add-AppxPackage : A parameter cannot be found that matches parameter name 'AllowUnsigned'

I tried on Powershell version 5.1 and 7.3.6 because I heard of some issues with Appx on certain versions. But neither has seemed to work.

Does anybody have any idea how to get it working?

Crunchbits commented 1 year ago

Okay I figured out a different way that does not require the Security Certificate. It's very similar to what was mentioned before but a bit different and this was the only way I was able to get it working. You also need to install the Windows App Runtime/dependencies (as previously mentioned) beforehand. I might be inaccurate in some minor details so tell me if I got something wrong. Here's how I did it:

  1. Go to Windows Settings\For developers and turn on Developer Mode so that it can be installed. Might need to restart PC but only restart as a last resort if powershell command does not work.
  2. Extract zip file to desired location. Choose wisely, you will not be able to move it later on while installed.
  3. Open GHelper (Package)_1.2.1.0_x64.msixbundle in 7zip. Then inside open GHelper%20%28Package%29_1.2.1.0_x64.msix. Select all of its contents and right clilck copy to a new folder of your choosing (I recall having trouble with spaces/percent signs in the name but could be misremembering). I named it: GHelper_Directory
  4. Go to file explorer and open GHelper_Directory folder. That is where AppxManifest.xml is found. Remember or copy file path for next step.
  5. Run Powershell (tested on version 5.1) as administrator and paste the following (change directory to your path): Add-AppxPackage -Path C:\Users\user\Desktop\GHelper\GHelper_Directory\AppxManifest.xml -Register **This command will only work if GHelper is not installed, so uninstall beforehand if installed.
  6. Exit out of Logitech GHub through the system tray and make sure GHelper works by opening it. Then turn off developer mode in windows settings if you have no plans to use it (for security reasons).
  7. Creating a shortcut to GHelper by shortcut Win+R and search "shell:AppsFolder". Then right click on GHelper and Create shortcut there.

Got part of the idea from: https://pureinfotech.com/install-unsigned-windows-10-apps-powershell/

joshieecs commented 1 year ago

Apparently -AllowUnsigned is only available on Windows 11, not Windows 10. I am guessing that is the issue. The method of unpacking the archive and registering the AppxManifest.xml of the loose files in-place should work. You might try -Register with -DisableDevelopmentMode. I don't know if it will let you skip turning on developer mode, but it should let you reinstall without having to uninstall first.