Last active
September 12, 2023 15:06
-
-
Save reisir/8bbbdcea9d84599c61a5dfdfa815d705 to your computer and use it in GitHub Desktop.
Associate .rmskin files to SkinInstaller.exe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find SkinInstaller.exe (search all drives recursively) | |
Write-Host Finding SkinInstaller.exe | |
$SkinInstaller = Get-Childitem -Path (Get-Volume | % { $_.DriveLetter } | Where { $_ -ne $null } | % { $_ + ":\" }) -Recurse -ErrorAction SilentlyContinue -File -Filter "SkinInstaller.exe" | Select-Object -First 1 | |
$SkinInstallerPath = $SkinInstaller.VersionInfo.FileName | |
Write-Host Found SkinInstaller.exe at $SkinInstallerPath | |
# Call ftype & assoc to set the command and file type association | |
Write-Host Associating .rmskin to SkinInstaller.exe | |
cmd.exe /c ftype Rainmeter.SkinInstaller=`"$SkinInstallerPath`" %1 | |
cmd.exe /c assoc .rmskin=Rainmeter.SkinInstaller |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to run either download the script or copy this command into PowerShell
the reason it's so long and fucked is that it uses a bunch of fallbacks for windows 7 and powershell<5
and Microsoft thought it was wise to make the default ExecutionPolicy reject all scripts even if you explicitly call them...