Skip to content

Instantly share code, notes, and snippets.

@reisir
Last active September 12, 2023 15:06
Show Gist options
  • Save reisir/8bbbdcea9d84599c61a5dfdfa815d705 to your computer and use it in GitHub Desktop.
Save reisir/8bbbdcea9d84599c61a5dfdfa815d705 to your computer and use it in GitHub Desktop.
Associate .rmskin files to SkinInstaller.exe
# 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
@reisir
Copy link
Author

reisir commented Sep 12, 2023

to run either download the script or copy this command into PowerShell

Set-ExecutionPolicy Bypass -Scope CurrentUser -Force ; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 ; Invoke-Expression (Invoke-WebRequest -UseBasicParsing https://gist.githubusercontent.com/reisir/8bbbdcea9d84599c61a5dfdfa815d705/raw/)

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment