# Define variables $localModZipPath = "$env:USERPROFILE\Downloads\dpyes-14i.7z" $localAutoLaunchZipPath = "$env:USERPROFILE\Downloads\dpyes-x64-auto-launch.7z" $extractModPath = "$env:USERPROFILE\Downloads\dpyes-14i" $extractAutoLaunchPath = "$env:USERPROFILE\Downloads\dpyes-x64-auto-launch\x64" $grimDawnPath = "C:\Program Files (x86)\Steam\steamapps\common\Grim Dawn" $grimDawnX64Path = "$grimDawnPath\x64" # Ensure 7-Zip is installed and available in the PATH $sevenZipPath = "C:\Program Files\7-Zip\7z.exe" if (-Not (Test-Path $sevenZipPath)) { Write-Output "7-Zip is not installed. Please install 7-Zip and ensure it is available at $sevenZipPath." exit } # Check if the mod zip file exists if (-Not (Test-Path $localModZipPath)) { Write-Output "Mod zip file not found: $localModZipPath" exit } # Check if the auto-launch zip file exists if (-Not (Test-Path $localAutoLaunchZipPath)) { Write-Output "Auto-launch zip file not found: $localAutoLaunchZipPath" exit } # Create extraction directories if they don't exist if (-Not (Test-Path $extractModPath)) { New-Item -ItemType Directory -Path $extractModPath } if (-Not (Test-Path $extractAutoLaunchPath)) { New-Item -ItemType Directory -Path $extractAutoLaunchPath } # Extract the mod file using 7-Zip & $sevenZipPath x $localModZipPath -o"$env:USERPROFILE\Downloads" # Extract the auto-launch file using 7-Zip & $sevenZipPath x $localAutoLaunchZipPath -o"$env:USERPROFILE\Downloads" # Move DPYes.exe and DPYes.dll to Grim Dawn directory if (Test-Path "$extractModPath\DPYes.exe") { Move-Item -Path "$extractModPath\DPYes.exe" -Destination $grimDawnPath -Force } else { Write-Output "DPYes.exe not found in the extracted files." } if (Test-Path "$extractModPath\DPYes.dll") { Move-Item -Path "$extractModPath\DPYes.dll" -Destination $