Rename wallpaper, set up D drive guard, add wallpaper setting change

This commit is contained in:
camoy 2024-06-26 22:38:43 -07:00
parent 372c0d3af4
commit e2e31225ba
3 changed files with 39 additions and 0 deletions

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

16
scripts/ps/assignd.ps1 Normal file
View File

@ -0,0 +1,16 @@
Write-Host "---Assigning Drive Letter D To Sweetcade Partition---"
Get-Partition -DriveLetter D
If ($? -eq True)
{
Write-Host "SC-HDD-ERR001: CANNOT ASSIGN D DRIVE LETTER"
Write-Host "Another disk is using the drive letter D:"
Write-Host "Sweetcade required that the second data partition is assigned drive letter D:"
Write-Host "Unable to continue. Please check that a USB drive, optical drive, or card reader is not using drive letter D:."
Write-Host "This script will exit after 60 seconds."
Start-Sleep -Seconds 60
Exit 1
}
Else
{
Get-Partition -DiskNumber 0 -PartitionNumber 5 | Set-Partition -NewDriveLetter D
}

View File

@ -13,3 +13,26 @@ Write-Host "---Installing AutoHotKeyV2---"
C:\sctools\ahk\ahk-v2.exe /S
Write-Host "---Installing WinIPAC Version 2---"
C:\sctools\ipac\winipacv2setup.exe /S /W
Write-Host "---Setting Wallpaper---"
$vSCSetWallpaperPath = "C:\sctools\wall\wallpaper.png"
$vSCSetWallpaperCode = @'
using System.Runtime.InteropServices;
namespace Win32
{
public class Wallpaper
{
[DllImport("user32.dll", CharSet=CharSet.Auto)]
static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni) ;
public static void SetWallpaper(string thePath)
{
SystemParametersInfo(20,0,thePath,3);
}
}
}
'@
Add-Type $vSCSetWallpaperCode
[Win32.Wallpaper]::SetWallpaper($vSCSetWallpaperPath)