Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 86 additions & 34 deletions bucket/everything.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
{
"version": "1.4.1.1032",
"description": "Locate files and folders by name instantly.",
"description": "A file and folder search engine for Windows that instantly locates files and folders by name.",
"homepage": "https://www.voidtools.com",
"license": "MIT",
"license": {
"identifier": "MIT",
"url": "https://www.voidtools.com/License.txt"
},
"notes": [
"To add Everything to right-click context menu, run:",
"reg import \"$dir\\install-context.reg\""
"To register file associations, please execute the following command:",
"reg import \"$dir\\install-associations.reg\"",
"To register application startup, please execute the following command:",
"reg import \"$dir\\register-startup-entry.reg\"",
"To register the context menu entry, please execute the following command:",
"reg import \"$dir\\install-context.reg\"",
"To register the URL protocol handler, please execute the following command:",
"reg import \"$dir\\register-url-handler.reg\"",
"",
"Please note that the related logic has been changed.",
"The context menu must be unregistered and then registered again, even if it was previously registered.",
"The following command can be used to unregister it:",
"reg import \"$dir\\uninstall-context.reg\"",
"No further action is required if this message appears again."
],
"architecture": {
"64bit": {
Expand All @@ -22,24 +37,23 @@
}
},
"pre_install": [
"# for arm64",
"if ($architecture -eq 'arm64') { Rename-Item \"$dir\\EverythingARM64.exe\" -NewName 'Everything.exe' }",
"# END",
"ensure \"$persist_dir\" | Out-Null",
"if (!(Test-Path \"$persist_dir\\Everything.ini\")) { Start-Process -Wait \"$dir\\Everything.exe\" -Args @('-install-config null') }",
"Get-ChildItem \"$persist_dir\\*\" -Include 'Bookmarks.csv', 'Everything.db', 'Everything.ini', 'Filters.csv', 'Search History.csv' | Copy-Item -Destination \"$dir\" -ErrorAction SilentlyContinue"
"if ($architecture -eq 'arm64') { Rename-Item -Path \"$dir\\EverythingARM64.exe\" -NewName 'Everything.exe' }",
"if (-not (Test-Path -Path \"$persist_dir\\*.ini\" -PathType Leaf)) {",
" Start-Process -FilePath \"$dir\\Everything.exe\" -ArgumentList @('-install-config', 'null') -NoNewWindow -Wait",
"}",
"# Hard links are not applicable here because the application creates a new file instead of modifying the existing one in place.",
"'*.db', '*.csv', '*.ico', '*.ini', '*.txt' | ForEach-Object {",
" if (Test-Path -Path \"$persist_dir\\$_\" -PathType Leaf) {",
" Copy-Item -Path \"$persist_dir\\$_\" -Destination $dir -Force",
" }",
"}"
],
"post_install": [
"$app_path = \"$dir\\Everything.exe\".Replace('\\', '\\\\')",
"'install-context.reg', 'uninstall-context.reg' | ForEach-Object {",
" if (Test-Path \"$bucketsdir\\extras\\scripts\\everything\\$_\") {",
" $content = Get-Content \"$bucketsdir\\extras\\scripts\\everything\\$_\"",
" $content = $content.Replace('$app_path', $app_path)",
" if ($global) {",
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
" }",
" }",
" $content | Set-Content -Path \"$dir\\$_\" -Encoding ascii",
"$everything_dir = $dir -replace '\\\\', '\\\\'",
Comment thread
SorYoshino marked this conversation as resolved.
"Get-ChildItem -Path \"$bucketsdir\\$bucket\\scripts\\$app\" -Filter '*.reg' -File | ForEach-Object -Process {",
" $content = Get-Content -Path $_.FullName -Encoding utf8",
" if ($global) { $content = $content -replace 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE' }",
" $content -replace '{{everything_dir}}', $everything_dir | Set-Content -Path \"$dir\\$($_.Name)\" -Encoding unicode",
"}"
],
"bin": "Everything.exe",
Expand All @@ -49,23 +63,61 @@
"Everything"
]
],
"persist": [
"Logs",
"HTTP server"
],
"pre_uninstall": [
"Stop-Process -Name 'Everything' -Force -ErrorAction SilentlyContinue",
"$service_installed_in_current_dir_via_scoop = (sc.exe qc Everything) -match $dir.Replace('\\', '\\\\')",
"if ($service_installed_in_current_dir_via_scoop) {",
" if ($(Get-Service -Name Everything -ErrorAction SilentlyContinue).Status -ne 'Stopped') {",
" if (!(is_admin) -and $(Get-Service -Name Everything -ErrorAction SilentlyContinue)) { error 'Admin rights are required to stop Everything service'; break }",
" Stop-Service -Name 'Everything' -Force -ErrorAction SilentlyContinue | Out-Null",
"# Hard links are not applicable here because the application creates a new file instead of modifying the existing one in place.",
"'*.db', '*.csv', '*.ico', '*.ini', '*.txt' | ForEach-Object {",
" if (Test-Path -Path \"$dir\\$_\" -PathType Leaf) {",
" Copy-Item -Path \"$dir\\$_\" -Destination $persist_dir -Force",
" }",
" if ((Get-Service -Name Everything -ErrorAction SilentlyContinue) -and ($cmd -eq 'uninstall')) {",
" if (!(is_admin) -and $(Get-Service -Name Everything -ErrorAction SilentlyContinue)) { error 'Admin rights are required to remove Everything service'; break }",
" sc.exe delete 'Everything'",
" }",
"}",
"if ($cmd -eq 'uninstall') { reg import \"$dir\\uninstall-context.reg\" }",
"Get-ChildItem \"$dir\\*\" -Include 'Bookmarks.csv', 'Everything.db', 'Everything.ini', 'Filters.csv', 'Search History.csv' | Copy-Item -Destination \"$persist_dir\" -ErrorAction SilentlyContinue -Force"
"}"
],
"checkver": "Download Everything ([\\d.]+)",
"uninstaller": {
"script": [
"if ($cmd -eq 'uninstall') {",
" Get-ChildItem -Path $dir -Filter 'un*.reg' -File | ForEach-Object {",
" $registry_file = \"`\"$($_.FullName)`\"\"",
" Start-Process -FilePath 'reg.exe' -ArgumentList @('import', $registry_file) -WindowStyle Hidden -Wait",
" }",
"}",
"$base_service_name = 'Everything'",
"$path_regex = [regex]::Escape((Split-Path -Path $dir -Parent))",
"$process = Get-Process -Name 'Everything' -ErrorAction SilentlyContinue | Where-Object { $_.Path -match $path_regex }",
"if ($process.Count -gt 0) {",
" Write-Host \"`nINFO Identified $($process.Count) running processes for termination.\" -ForegroundColor DarkGray",
" Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue",
Comment thread
haussmann marked this conversation as resolved.
"}",
"if ($PSVersionTable.PSVersion -ge [version]::new(6, 0)) {",
" $services = Get-Service -Name \"*$base_service_name*\" -ErrorAction SilentlyContinue",
"} else {",
" $name_filter = \"Name like '%$base_service_name%'\"",
" $services = Get-CimInstance -ClassName Win32_Service -Filter $name_filter -ErrorAction SilentlyContinue |",
" Select-Object -Property *, @{ Name = 'BinaryPathName'; Expression = { $_.PathName } }",
"}",
"$service = $services | Where-Object { $_.BinaryPathName -match $path_regex }",
"if ($null -ne $service) {",
Comment thread
SorYoshino marked this conversation as resolved.
" if (-not (is_admin)) { abort \"`n[ERROR] $app requires admin rights to $cmd.\" }",
" Stop-Service -Name $service.Name -Force -ErrorAction SilentlyContinue",
" $process.Id | Where-Object { $null -ne $_ } | ForEach-Object {",
" Get-Process -Id $_ -ErrorAction SilentlyContinue | Where-Object { $_.Name -like '*Everything*' }",
" } | Stop-Process -Force -ErrorAction SilentlyContinue",
" Start-Sleep -Milliseconds 1500",
" if ($cmd -ne 'uninstall') { return }",
" if ($PSVersionTable.PSVersion -ge [version]::new(6, 0)) {",
" Remove-Service -Name 'Everything' -ErrorAction SilentlyContinue",
" } else {",
" Start-Process -FilePath 'sc.exe' -ArgumentList @('delete', 'Everything') -NoNewWindow -Wait",
" }",
Comment thread
SorYoshino marked this conversation as resolved.
"}"
]
},
"checkver": {
"url": "https://www.voidtools.com/Changes.txt",
"regex": "Version\\s*([\\d.]+)(?=\\s)"
Comment thread
SorYoshino marked this conversation as resolved.
},
"autoupdate": {
"architecture": {
"64bit": {
Expand Down
32 changes: 32 additions & 0 deletions scripts/everything/install-associations.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\.efu]
"Content Type"="text/plain"
"PerceivedType"="text"

[HKEY_CURRENT_USER\Software\Classes\.efu\OpenWithProgIDs]
"Everything.FileList"=hex(0):


[HKEY_CURRENT_USER\Software\Classes\Everything.FileList]
@="Everything File List"
"AppUserModelID"="voidtools.Everything"
"FriendlyTypeName"="Everything File List"

[HKEY_CURRENT_USER\Software\Classes\Everything.FileList\DefaultIcon]
@="\"{{everything_dir}}\\Everything.exe\",1"

[HKEY_CURRENT_USER\Software\Classes\Everything.FileList\shell]
@="open"

[HKEY_CURRENT_USER\Software\Classes\Everything.FileList\shell\edit]
"Icon"="\"{{everything_dir}}\\Everything.exe\",0"

[HKEY_CURRENT_USER\Software\Classes\Everything.FileList\shell\edit\command]
@="\"{{everything_dir}}\\Everything.exe\" -edit \"%1\""

[HKEY_CURRENT_USER\Software\Classes\Everything.FileList\shell\open]
"Icon"="\"{{everything_dir}}\\Everything.exe\",0"

[HKEY_CURRENT_USER\Software\Classes\Everything.FileList\shell\open\command]
@="\"{{everything_dir}}\\Everything.exe\" \"%1\""
23 changes: 8 additions & 15 deletions scripts/everything/install-context.reg
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Directory\shell\Everything]
[HKEY_CURRENT_USER\Software\Classes\Directory\background\shell\Search Everything...]
@="Search with &Everything"
"Icon"="$app_path"
"Icon"="\"{{everything_dir}}\\Everything.exe\",0"

[HKEY_CURRENT_USER\Software\Classes\Directory\shell\Everything\command]
@="$app_path -path \"%1\""
[HKEY_CURRENT_USER\Software\Classes\Directory\background\shell\Search Everything...\command]
@="\"{{everything_dir}}\\Everything.exe\" -path \"%V\""

[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Everything]
@="Search with &Everything"
"Icon"="$app_path"

; %v – For verbs that are none implies all. If there is no parameter passed this is the working directory.
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Everything\command]
@="$app_path -path \"%V\""

[HKEY_CURRENT_USER\Software\Classes\Drive\shell\Everything]
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\Search Everything...]
@="Search with &Everything"
"Icon"="$app_path"
"Icon"="\"{{everything_dir}}\\Everything.exe\",0"

[HKEY_CURRENT_USER\Software\Classes\Drive\shell\Everything\command]
@="$app_path -path \"%1\""
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\Search Everything...\command]
@="\"{{everything_dir}}\\Everything.exe\" -path \"%1\""
4 changes: 4 additions & 0 deletions scripts/everything/register-startup-entry.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"Everything"="\"{{everything_dir}}\\Everything.exe\" -startup"
15 changes: 15 additions & 0 deletions scripts/everything/register-url-handler.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\ES]
@="URL:Everything Search Protocol"
"URL Protocol"=""

[HKEY_CURRENT_USER\Software\Classes\ES\DefaultIcon]
@="\"{{everything_dir}}\\Everything.exe\",0"

[HKEY_CURRENT_USER\Software\Classes\ES\shell]

[HKEY_CURRENT_USER\Software\Classes\ES\shell\open]

[HKEY_CURRENT_USER\Software\Classes\ES\shell\open\command]
@="\"{{everything_dir}}\\Everything.exe\" -url \"%1\""
6 changes: 6 additions & 0 deletions scripts/everything/uninstall-associations.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\.efu\OpenWithProgIDs]
"Everything.FileList"=-

[-HKEY_CURRENT_USER\Software\Classes\Everything.FileList]
12 changes: 9 additions & 3 deletions scripts/everything/uninstall-context.reg
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\Directory\background\shell\Search Everything...]

[-HKEY_CURRENT_USER\Software\Classes\Folder\shell\Search Everything...]

; The entries below are retained to remove context menu items created by earlier versions
; These legacy cleanup rules will be removed after several future updates

[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\Everything]
[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\Everything\command]

[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Everything]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Everything\command]

[-HKEY_CURRENT_USER\Software\Classes\Drive\shell\Everything]
[-HKEY_CURRENT_USER\Software\Classes\Drive\shell\Everything\command]
4 changes: 4 additions & 0 deletions scripts/everything/unregister-startup-entry.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"Everything"=-
3 changes: 3 additions & 0 deletions scripts/everything/unregister-url-handler.reg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\ES]