generated from Ash258/GenericBucket
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUAC.PowerToys.json
52 lines (52 loc) · 2.5 KB
/
UAC.PowerToys.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
"version": "0.87.1",
"description": "Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity. Inspired by the Windows 95 era PowerToys project, this reboot provides power users with ways to squeeze more efficiency out of the Windows 10 shell and customize it for individual workflows.",
"homepage": "https://github.com/microsoft/PowerToys",
"license": {
"identifier": "MIT"
},
"notes": "",
"depends": "dotnet-desktop-runtime",
"url": "https://github.com/microsoft/PowerToys/releases/download/v0.87.1/PowerToysSetup-0.87.1-x64.exe#/install.exe",
"hash": "69ad65ddac6436aef292d2cc6ab1530021ce98083cb3f5fd3380a52a3b0dbb9a",
"installer": {
"script": [
"If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] \"Administrator\")){",
" abort \"ERROR: install require UAC. Please try again.\"",
"}",
"Start-Process $dir\\install.exe -ArgumentList '--silent' -Wait",
"Remove-Item $dir\\install.exe"
]
},
"post_install": [
"Get-ChildItem 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\' | ForEach-Object {",
" $value = Get-ItemProperty $_.PSPath; ",
" if ($value.DisplayName -ne $null) {",
" if ($value.DisplayName.Contains(\"PowerToys\")) { ",
" [System.IO.Path]::GetFileName($_.name) | Out-File $dir\\id",
" $yes = $true",
" }",
" }",
"}",
"if (!$yes) {",
" abort 'Unable to find product Code.'",
"}"
],
"uninstaller": {
"script": [
"If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] \"Administrator\")){",
" abort \"ERROR: uninstall require UAC. Please try again.\"",
"}",
"$idFile = \"$dir\\id\"",
"if (!(Test-Path $idFile)) {",
" abort 'Unable to find product Code.'",
"}",
"$id = Get-Content $idFile",
"Start-Process msiexec.exe -ArgumentList '/q',\"/x $id\" -Wait"
]
},
"checkver": "github",
"autoupdate": {
"url": "https://github.com/microsoft/PowerToys/releases/download/v$version/PowerToysSetup-$version-x64.exe#/install.exe"
}
}