-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPSPreviewHandler
21 lines (20 loc) · 1.23 KB
/
PSPreviewHandler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Set path variables for PowerShell file types
$Path1 = 'Registry::HKEY_CLASSES_ROOT\.ps1'
$Path2 = 'Registry::HKEY_CLASSES_ROOT\.psm1'
$Path3 = 'Registry::HKEY_CLASSES_ROOT\.psd1'
$Path4 = 'Registry::HKEY_CLASSES_ROOT\.log'
$Path5 = 'Registry::HKEY_CLASSES_ROOT\.json'
$Path6 = 'Registry::HKEY_CLASSES_ROOT\.yml'
$Path7 = 'Registry::HKEY_CLASSES_ROOT\.sh'
$Path8 = 'Registry::HKEY_CLASSES_ROOT\.vbs'
$Path9 = 'Registry::HKEY_CLASSES_ROOT\.py'
# Enable preview of those file types
New-ItemProperty -Path $Path1 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path2 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path3 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path4 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path5 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path6 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path7 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path8 -Name PerceivedType -PropertyType String -Value 'text'
New-ItemProperty -Path $Path9 -Name PerceivedType -PropertyType String -Value 'text'