-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The certificate cannot be verified during Windows 10 system installation #2313
Comments
Thank you for your interest! You can install through either of these methods:
Note regarding the Microsoft Store version: As this is open source software, I haven't purchased a code signing certificate (which costs around $400 annually), hence both installation options are provided. Actually, # Generated by Hydraulic Conveyor: https://www.hydraulic.dev
# Startup script for self-signed MSIX packaged apps.
$CertName = "CN=85A51CE1-8911-4CD3-94A0-F98F4E742FED"
$FSName = "crosspaste"
$PackageName = "ShenzhenCompileFutureTech.CrossPaste"
$Site = "https://github.com/CrossPaste/crosspaste-desktop/releases/latest/download"
$CertURL = "${Site}/${FSName}.crt"
# Install the self-signed code signing cert, if necessary. Unfortunately, we can't install to the user-specific cert store, so we have to be admin.
# 1. Do we have it already?
if (!((dir cert:\LocalMachine\TrustedPeople).Subject -contains $CertName))
{
# 2. No. Are we admin?
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
# No. So we have to elevate.
Write-Output "Attempting to add root certificate ..."
# 3. Write the cert to a temp file
$cert = $Env:Temp + "\${FSName}.crt"
Invoke-WebRequest -Uri "$CertURL" -OutFile $cert
$cmd = "Import-Certificate -FilePath '$cert' -CertStoreLocation `"Cert:\LocalMachine\TrustedPeople`";Start-Sleep -s 2"
# 4. Elevate to local admin and install the cert with that script.
Start-Process powershell -ArgumentList "$cmd" -Wait -Verb runAs
}
}
# Install the MSIX package (will show an ascii art progress bar).
# Although we could open the GUI AppInstaller app here, and that has some advantages, there's no way to force it to the foreground.
# Every attempt using Win32 fails, presumably because it's running elevated and windows UAC screws things up.
Add-AppxPackage -AppInstallerFile "${Site}/${FSName}.appinstaller"
start "shell:appsFolder\ShenzhenCompileFutureTech.CrossPaste_gphsk9mrjnczc!Crosspaste" |
How frequently does the bug occur?
Always
Description
Stacktrace & log output
No response
Can you reproduce the bug?
No
Reproduction Steps
No response
Version
1184
OS
windows10
The text was updated successfully, but these errors were encountered: