// Name: Move Temp Folder to Default Location
// Description: Moves the temp folder from X:/temp back to its default Windows 11 location
// Author: s3cr1z
import "@johnlindquist/kit"
const currentTempPath = "X:/temp"
const defaultTempPath = `${process.env.USERPROFILE}\\AppData\\Local\\Temp`
// PowerShell script to move temp folder back to default location
const powershellScript = `
# Check if running as administrator
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Host "This script requires administrator privileges. Please run as administrator." -ForegroundColor Red
exit 1
}
Write-Host "Moving temp folder from ${currentTempPath} to default location..." -ForegroundColor Yellow
# Check if custom temp folder exists