mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-28 08:51:31 -06:00
Now it works
This commit is contained in:
parent
34dc2bda71
commit
cf9911a8a0
@ -2553,29 +2553,18 @@
|
|||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a031_",
|
"Order": "a031_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"reg add \"HKCR\\*\\shell\\runas\" /ve /d \"Take Ownership\" /f",
|
||||||
New-Item -Path \"Registry::HKCR:\\*\\shell\\runas\" -Force | Out-Null
|
"reg add \"HKCR\\*\\shell\\runas\" /v \"NoWorkingDirectory\" /d \"\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\" -Name \"(default)\" -Value 'Take Ownership'
|
"reg add \"HKCR\\*\\shell\\runas\\command\" /ve /d \"cmd.exe /c takeown /f '%1' && icacls '%1' /grant administrators:F\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\" -Name \"NoWorkingDirectory\" -Value ''
|
"reg add \"HKCR\\*\\shell\\runas\\command\" /v \"IsolatedCommand\" /d \"cmd.exe /c takeown /f '%1' && icacls '%1' /grant administrators:F\" /f",
|
||||||
|
"reg add \"HKCR\\Directory\\shell\\runas\" /ve /d \"Take Ownership\" /f",
|
||||||
New-Item -Path \"Registry::HKCR:\\*\\shell\\runas\\command\" -Force | Out-Null
|
"reg add \"HKCR\\Directory\\shell\\runas\" /v \"NoWorkingDirectory\" /d \"\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\\command\" -Name \"(default)\" -Value 'cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F'
|
"reg add \"HKCR\\Directory\\shell\\runas\\command\" /ve /d \"cmd.exe /c takeown /f '%1' /r /d y && icacls '%1' /grant administrators:F /t\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\\command\" -Name \"IsolatedCommand\" -Value 'cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F'
|
"reg add \"HKCR\\Directory\\shell\\runas\\command\" /v \"IsolatedCommand\" /d \"cmd.exe /c takeown /f '%1' /r /d y && icacls '%1' /grant administrators:F /t\" /f"
|
||||||
|
|
||||||
New-Item -Path \"Registry::HKCR:\\Directory\\shell\\runas\" -Force | Out-Null
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\" -Name \"(default)\" -Value 'Take Ownership'
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\" -Name \"NoWorkingDirectory\" -Value ''
|
|
||||||
|
|
||||||
New-Item -Path \"Registry::HKCR:\\Directory\\shell\\runas\\command\" -Force | Out-Null
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\\command\" -Name \"(default)\" -Value 'cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t'
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\\command\" -Name \"IsolatedCommand\" -Value 'cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t'
|
|
||||||
"
|
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"reg delete \"HKCR\\*\\shell\\runas\" /f",
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path \"Registry::HKCR:\\*\\shell\\runas\"
|
"reg delete \"HKCR\\Directory\\shell\\runas\" /f"
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path \"Registry::HKCR:\\Directory\\shell\\runas\"
|
|
||||||
"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFToggleDarkMode": {
|
"WPFToggleDarkMode": {
|
||||||
|
33
winutil.ps1
33
winutil.ps1
@ -10,6 +10,7 @@
|
|||||||
Author : Chris Titus @christitustech
|
Author : Chris Titus @christitustech
|
||||||
Runspace Author: @DeveloperDurp
|
Runspace Author: @DeveloperDurp
|
||||||
GitHub : https://github.com/ChrisTitusTech
|
GitHub : https://github.com/ChrisTitusTech
|
||||||
|
Version : 24.02.21
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
[switch]$Debug,
|
[switch]$Debug,
|
||||||
@ -46,6 +47,7 @@ Add-Type -AssemblyName System.Windows.Forms
|
|||||||
# Variable to sync between runspaces
|
# Variable to sync between runspaces
|
||||||
$sync = [Hashtable]::Synchronized(@{})
|
$sync = [Hashtable]::Synchronized(@{})
|
||||||
$sync.PSScriptRoot = $PSScriptRoot
|
$sync.PSScriptRoot = $PSScriptRoot
|
||||||
|
$sync.version = "24.02.21"
|
||||||
$sync.configs = @{}
|
$sync.configs = @{}
|
||||||
$sync.ProcessRunning = $false
|
$sync.ProcessRunning = $false
|
||||||
|
|
||||||
@ -10627,29 +10629,18 @@ $sync.configs.tweaks = '{
|
|||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a031_",
|
"Order": "a031_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"reg add \"HKCR\\*\\shell\\runas\" /ve /d \"Take Ownership\" /f",
|
||||||
New-Item -Path \"Registry::HKCR:\\*\\shell\\runas\" -Force | Out-Null
|
"reg add \"HKCR\\*\\shell\\runas\" /v \"NoWorkingDirectory\" /d \"\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\" -Name \"(default)\" -Value ''Take Ownership''
|
"reg add \"HKCR\\*\\shell\\runas\\command\" /ve /d \"cmd.exe /c takeown /f ''%1'' && icacls ''%1'' /grant administrators:F\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\" -Name \"NoWorkingDirectory\" -Value ''''
|
"reg add \"HKCR\\*\\shell\\runas\\command\" /v \"IsolatedCommand\" /d \"cmd.exe /c takeown /f ''%1'' && icacls ''%1'' /grant administrators:F\" /f",
|
||||||
|
"reg add \"HKCR\\Directory\\shell\\runas\" /ve /d \"Take Ownership\" /f",
|
||||||
New-Item -Path \"Registry::HKCR:\\*\\shell\\runas\\command\" -Force | Out-Null
|
"reg add \"HKCR\\Directory\\shell\\runas\" /v \"NoWorkingDirectory\" /d \"\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\\command\" -Name \"(default)\" -Value ''cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F''
|
"reg add \"HKCR\\Directory\\shell\\runas\\command\" /ve /d \"cmd.exe /c takeown /f ''%1'' /r /d y && icacls ''%1'' /grant administrators:F /t\" /f",
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\*\\shell\\runas\\command\" -Name \"IsolatedCommand\" -Value ''cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F''
|
"reg add \"HKCR\\Directory\\shell\\runas\\command\" /v \"IsolatedCommand\" /d \"cmd.exe /c takeown /f ''%1'' /r /d y && icacls ''%1'' /grant administrators:F /t\" /f"
|
||||||
|
|
||||||
New-Item -Path \"Registry::HKCR:\\Directory\\shell\\runas\" -Force | Out-Null
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\" -Name \"(default)\" -Value ''Take Ownership''
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\" -Name \"NoWorkingDirectory\" -Value ''''
|
|
||||||
|
|
||||||
New-Item -Path \"Registry::HKCR:\\Directory\\shell\\runas\\command\" -Force | Out-Null
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\\command\" -Name \"(default)\" -Value ''cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t''
|
|
||||||
Set-ItemProperty -Path \"Registry::HKCR:\\Directory\\shell\\runas\\command\" -Name \"IsolatedCommand\" -Value ''cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t''
|
|
||||||
"
|
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"reg delete \"HKCR\\*\\shell\\runas\" /f",
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path \"Registry::HKCR:\\*\\shell\\runas\"
|
"reg delete \"HKCR\\Directory\\shell\\runas\" /f"
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path \"Registry::HKCR:\\Directory\\shell\\runas\"
|
|
||||||
"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFToggleDarkMode": {
|
"WPFToggleDarkMode": {
|
||||||
|
Loading…
Reference in New Issue
Block a user