Added ImageGlass Default Photo Viewer
This commit is contained in:
parent
9d34289599
commit
77cce00304
@ -1,5 +1,5 @@
|
|||||||
# Script to set Google Chrome as default for specified file types and link types
|
# Script to set Google Chrome as default for specified file types and link types
|
||||||
$fileTypes = @(".htm", ".html", ".mhtml", ".svg", ".shtml", ".webp", ".xht", ".xhtml")
|
$fileTypes = @(".htm", ".html", ".mhtml", ".svg", ".shtml", ".xht", ".xhtml")
|
||||||
$linkTypes = @("http", "https")
|
$linkTypes = @("http", "https")
|
||||||
$setUserFtaPath = "C:\Scripts\Software\setuserfta.exe"
|
$setUserFtaPath = "C:\Scripts\Software\setuserfta.exe"
|
||||||
|
|
||||||
|
|||||||
42
Login/DefaultApp-ImageGlass.ps1
Normal file
42
Login/DefaultApp-ImageGlass.ps1
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Script to set ImageGlass as default for specified file types
|
||||||
|
$fileTypes = @(".png", ".jpg", ".jpeg", ".webp", ".gif", ".tiff", ".bmp", ".heif", ".heic")
|
||||||
|
$setUserFtaPath = "C:\Scripts\Software\setuserfta.exe"
|
||||||
|
|
||||||
|
# Function to check and set default app for a file type
|
||||||
|
function Set-DefaultAppIfNeeded {
|
||||||
|
param(
|
||||||
|
[string]$fileType
|
||||||
|
)
|
||||||
|
|
||||||
|
try {
|
||||||
|
# Get the current default app for the file type
|
||||||
|
$currentDefault = (Get-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$fileType\UserChoice" -ErrorAction SilentlyContinue).ProgId
|
||||||
|
|
||||||
|
# Check if ImageGlass is not the default
|
||||||
|
if ($currentDefault -ne "ImageGlass") {
|
||||||
|
Write-Host "Setting ImageGlass as default for $fileType"
|
||||||
|
|
||||||
|
# Ensure setuserfta.exe path exists
|
||||||
|
if (-not (Test-Path $setUserFtaPath)) {
|
||||||
|
Write-Error "setuserfta.exe not found at $setUserFtaPath"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run setuserfta.exe to set ImageGlass as default
|
||||||
|
Start-Process $setUserFtaPath -ArgumentList "`"$fileType`" ImageGlass" -Wait -NoNewWindow
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "ImageGlass is already the default for $fileType"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error "Error processing $fileType`: $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process each file type
|
||||||
|
foreach ($type in $fileTypes) {
|
||||||
|
Set-DefaultAppIfNeeded -fileType $type
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "File type default app check completed."
|
||||||
@ -18,6 +18,10 @@ powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\DefaultApp-Adobe.ps1"
|
|||||||
echo Setting Google Chrome to Default Browser... >> "%LOGFILE%"
|
echo Setting Google Chrome to Default Browser... >> "%LOGFILE%"
|
||||||
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\DefaultApp-Chrome.ps1"
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\DefaultApp-Chrome.ps1"
|
||||||
|
|
||||||
|
:: Set ImageGlass to Default Photo Viewer
|
||||||
|
echo Setting ImageGlass to Default Photo Viewer... >> "%LOGFILE%"
|
||||||
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\DefaultApp-ImageGlass.ps1"
|
||||||
|
|
||||||
:: Run Debloat Script
|
:: Run Debloat Script
|
||||||
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Software\Win11Debloat\Win11Debloat.ps1" -Silent -RemoveW11Outlook -DisableTelemetry -DisableBing -DisableSuggestions -DisableLockscreenTips -ShowKnownFileExt
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Software\Win11Debloat\Win11Debloat.ps1" -Silent -RemoveW11Outlook -DisableTelemetry -DisableBing -DisableSuggestions -DisableLockscreenTips -ShowKnownFileExt
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user