Skip to content
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

Update config-powershell.yml #916

Closed
wants to merge 1 commit into from
Closed
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
18 changes: 8 additions & 10 deletions src/playbook/Configuration/tweaks/qol/config-powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ actions:
# Set .ps1 file types to open with PowerShell by default
# Batch scripts are not restricted and this measure can easily be bypassed by calling PowerShell within a batch script
- !cmd: {command: 'ftype Microsoft.PowerShellScript.1="%windir%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -EP Unrestricted -File "%1" %*'}
- !registryValue:
path: 'HKCR\Applications\powershell.exe\shell\open\command'
value: ''
data: '"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -EP Unrestricted -File "%1" %*'
type: REG_SZ
- !registryValue:
path: 'HKCR\ps1_auto_file\shell\open\command'
value: ''
data: '"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -EP Unrestricted -File "%1" %*'
type: REG_SZ
- !cmd:
command: 'echo New-Item -Force -Path "Registry::HKEY_CLASSES_ROOT\Applications\powershell.exe\shell\open\command";New-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Applications\powershell.exe\shell\open\command" -Name "(default)" -PropertyType String -Value ''"%windir%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -EP Unrestricted -File "%1" %*'' > script.ps1 & powershell -NoP -NoLogo -EP Unrestricted -File script.ps1'
wait: true
exeDir: true
- !cmd:
command: 'echo New-Item -Force -Path "Registry::HKEY_CLASSES_ROOT\ps1_auto_file\shell\open\command";New-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\ps1_auto_file\shell\open\command" -Name "(default)" -PropertyType String -Value ''"%windir%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -EP Unrestricted -File "%1" %*'' > script.ps1 & powershell -NoP -NoLogo -EP Unrestricted -File script.ps1'
wait: true
exeDir: true
- !registryValue:
path: 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ps1\OpenWithList'
value: 'a'
Expand Down