nuke old
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_blender-boss.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to blender-boss..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t blender-boss "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_echo.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to echo..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t echo "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
# Script to handle network drive mapping and file copying
|
|
||||||
# Author: Nathan
|
|
||||||
# Date: 2025-04-23
|
|
||||||
|
|
||||||
# Function to check if a drive is mapped
|
|
||||||
function Test-DriveMapped {
|
|
||||||
param (
|
|
||||||
[string]$DriveLetter
|
|
||||||
)
|
|
||||||
$drive = Get-PSDrive -Name $DriveLetter -ErrorAction SilentlyContinue
|
|
||||||
return $null -ne $drive
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to remove a mapped drive
|
|
||||||
function Remove-MappedDrive {
|
|
||||||
param (
|
|
||||||
[string]$DriveLetter
|
|
||||||
)
|
|
||||||
if (Test-DriveMapped -DriveLetter $DriveLetter) {
|
|
||||||
Write-Host "Removing existing $DriveLetter drive mapping..."
|
|
||||||
Remove-PSDrive -Name $DriveLetter -Force
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to map a network drive
|
|
||||||
function Map-NetworkDrive {
|
|
||||||
param (
|
|
||||||
[string]$DriveLetter,
|
|
||||||
[string]$NetworkPath
|
|
||||||
)
|
|
||||||
Write-Host "Mapping $DriveLetter to $NetworkPath..."
|
|
||||||
New-PSDrive -Name $DriveLetter -PSProvider FileSystem -Root $NetworkPath -Persist
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to copy files using robocopy
|
|
||||||
function Copy-FilesWithRobocopy {
|
|
||||||
param (
|
|
||||||
[string]$SourcePath,
|
|
||||||
[string]$DestinationPath
|
|
||||||
)
|
|
||||||
Write-Host "Copying files from $SourcePath to $DestinationPath..."
|
|
||||||
robocopy $SourcePath $DestinationPath /E /MOVE
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main script execution
|
|
||||||
try {
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Copy-FilesWithRobocopy -SourcePath "C:\nexus\amazon" -DestinationPath "F:\renders"
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Error "An error occurred: $_"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_i9-13ks.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to i9-13ks..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t i9-13ks "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_masterbox.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to masterbox..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t masterbox "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0recover_max.ps1"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
Write-Host "Connecting to max..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
|
|
||||||
# Copy files from C:\nexus\amazon to F:\renders
|
|
||||||
Write-Host "`nCopying files..."
|
|
||||||
robocopy "C:\nexus\amazon" "F:\renders" /E /MOVE
|
|
||||||
|
|
||||||
Write-Host "Operation completed successfully!"
|
|
||||||
|
|
||||||
# Delete the C:\NEXUS directory
|
|
||||||
Write-Host "`nDeleting C:\NEXUS directory..."
|
|
||||||
rmdir /s /q "C:\NEXUS"
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "C:\NEXUS directory deleted successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to delete C:\NEXUS directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t max "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
@echo off
|
|
||||||
title Flamenco CMD Worker Launcher
|
|
||||||
echo Starting Flamenco CMD Worker Launcher...
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0cmd_run_flamenco_workers.ps1"
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
# Unified Flamenco Worker Connection Script (CMD VERSION)
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host " FLAMENCO CMD WORKER LAUNCHER" -ForegroundColor Cyan
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Define available systems
|
|
||||||
$systems = @(
|
|
||||||
@{ ID = 1; Name = "masterbox"; ScriptPath = "run_masterbox_cmd.ps1"; BatchPath = "run_masterbox_cmd.bat" },
|
|
||||||
@{ ID = 2; Name = "i9-13ks"; ScriptPath = "run_i9-13ks_cmd.ps1"; BatchPath = "run_i9-13ks_cmd.bat" },
|
|
||||||
@{ ID = 3; Name = "max"; ScriptPath = "run_max_cmd.ps1"; BatchPath = "run_max_cmd.bat" },
|
|
||||||
@{ ID = 4; Name = "echo"; ScriptPath = "run_echo_cmd.ps1"; BatchPath = "run_echo_cmd.bat" },
|
|
||||||
@{ ID = 5; Name = "blender-boss"; ScriptPath = "run_blender-boss_cmd.ps1"; BatchPath = "run_blender-boss_cmd.bat" }
|
|
||||||
)
|
|
||||||
|
|
||||||
# Print menu options
|
|
||||||
Write-Host "Select a system to connect to (CMD VERSION):" -ForegroundColor Yellow
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
Write-Host "$($system.ID). $($system.Name)" -ForegroundColor Green
|
|
||||||
}
|
|
||||||
Write-Host "0. Connect to ALL systems (separate windows)" -ForegroundColor Magenta
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Get user selection
|
|
||||||
$selection = Read-Host "Enter your selection (0-$($systems.Count))"
|
|
||||||
|
|
||||||
# Process selection
|
|
||||||
if ($selection -eq "0") {
|
|
||||||
# Launch all systems in separate windows
|
|
||||||
Write-Host "Launching all worker scripts in separate windows..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
$scriptPath = Join-Path (Get-Location) $system.BatchPath
|
|
||||||
Start-Process "cmd.exe" -ArgumentList "/c $scriptPath" -WindowStyle Normal
|
|
||||||
Write-Host "Started $($system.Name) worker in a new window." -ForegroundColor Green
|
|
||||||
Start-Sleep -Seconds 2 # Add a small delay between launches
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nAll worker scripts have been launched." -ForegroundColor Cyan
|
|
||||||
Write-Host "Each worker is running in its own command window." -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
# Find the selected system
|
|
||||||
$selectedSystem = $systems | Where-Object { $_.ID -eq [int]$selection }
|
|
||||||
|
|
||||||
if ($selectedSystem) {
|
|
||||||
Write-Host "Launching $($selectedSystem.Name) worker script..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
# Execute the PowerShell script directly
|
|
||||||
$scriptPath = Join-Path (Get-Location) $selectedSystem.ScriptPath
|
|
||||||
& $scriptPath
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Host "Invalid selection. Please run the script again." -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
$null = Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_blender-boss_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to blender-boss..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t blender-boss "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_blender-boss_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to blender-boss..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t blender-boss "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_echo_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to echo..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t echo "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_echo_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to echo..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t echo "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
@echo off
|
|
||||||
title Flamenco Worker Launcher
|
|
||||||
echo Starting Flamenco Worker Launcher...
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_flamenco_workers.ps1"
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
# Unified Flamenco Worker Connection Script (STANDARD VERSION)
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host " FLAMENCO WORKER LAUNCHER" -ForegroundColor Cyan
|
|
||||||
Write-Host "====================================" -ForegroundColor Cyan
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Define available systems
|
|
||||||
$systems = @(
|
|
||||||
@{ ID = 1; Name = "masterbox"; ScriptPath = "run_masterbox_worker.ps1"; BatchPath = "run_masterbox_worker.bat" },
|
|
||||||
@{ ID = 2; Name = "i9-13ks"; ScriptPath = "run_i9-13ks_worker.ps1"; BatchPath = "run_i9-13ks_worker.bat" },
|
|
||||||
@{ ID = 3; Name = "max"; ScriptPath = "run_max_worker.ps1"; BatchPath = "run_max_worker.bat" },
|
|
||||||
@{ ID = 4; Name = "echo"; ScriptPath = "run_echo_worker.ps1"; BatchPath = "run_echo_worker.bat" },
|
|
||||||
@{ ID = 5; Name = "blender-boss"; ScriptPath = "run_blender-boss_worker.ps1"; BatchPath = "run_blender-boss_worker.bat" }
|
|
||||||
)
|
|
||||||
|
|
||||||
# Print menu options
|
|
||||||
Write-Host "Select a system to connect to:" -ForegroundColor Yellow
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
Write-Host "$($system.ID). $($system.Name)" -ForegroundColor Green
|
|
||||||
}
|
|
||||||
Write-Host "0. Connect to ALL systems (separate windows)" -ForegroundColor Magenta
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
# Get user selection
|
|
||||||
$selection = Read-Host "Enter your selection (0-$($systems.Count))"
|
|
||||||
|
|
||||||
# Process selection
|
|
||||||
if ($selection -eq "0") {
|
|
||||||
# Launch all systems in separate windows
|
|
||||||
Write-Host "Launching all worker scripts in separate windows..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
foreach ($system in $systems) {
|
|
||||||
$scriptPath = Join-Path (Get-Location) $system.BatchPath
|
|
||||||
Start-Process "cmd.exe" -ArgumentList "/c $scriptPath" -WindowStyle Normal
|
|
||||||
Write-Host "Started $($system.Name) worker in a new window." -ForegroundColor Green
|
|
||||||
Start-Sleep -Seconds 2 # Add a small delay between launches
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nAll worker scripts have been launched." -ForegroundColor Cyan
|
|
||||||
Write-Host "Each worker is running in its own command window." -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
# Find the selected system
|
|
||||||
$selectedSystem = $systems | Where-Object { $_.ID -eq [int]$selection }
|
|
||||||
|
|
||||||
if ($selectedSystem) {
|
|
||||||
Write-Host "Launching $($selectedSystem.Name) worker script..." -ForegroundColor Cyan
|
|
||||||
|
|
||||||
# Execute the PowerShell script directly
|
|
||||||
$scriptPath = Join-Path (Get-Location) $selectedSystem.ScriptPath
|
|
||||||
& $scriptPath
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Host "Invalid selection. Please run the script again." -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
$null = Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_i9-13ks_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to i9-13ks..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t -p 22146 i9-13ks "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_i9-13ks_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to i9-13ks..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t -p 22146 i9-13ks "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_masterbox_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to masterbox..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t masterbox "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_masterbox_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to masterbox..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t masterbox "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0run_max_cmd.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to max..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nRunning command file..."
|
|
||||||
$cmdFilePath = "F:\software\Flamenco 3.6\run-flamenco-worker.cmd"
|
|
||||||
$cmdDirectory = "F:\software\Flamenco 3.6"
|
|
||||||
|
|
||||||
if (Test-Path $cmdFilePath) {
|
|
||||||
Write-Host "Starting $cmdFilePath..."
|
|
||||||
# Change to the directory containing the CMD file first
|
|
||||||
Set-Location $cmdDirectory
|
|
||||||
# Run the CMD file
|
|
||||||
cmd /c $cmdFilePath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at $cmdFilePath" -ForegroundColor Red
|
|
||||||
$customPath = Read-Host "Enter the path to your .cmd file"
|
|
||||||
if (Test-Path $customPath) {
|
|
||||||
Write-Host "Starting $customPath..."
|
|
||||||
# Get the directory of the custom path
|
|
||||||
$customDirectory = Split-Path -Parent $customPath
|
|
||||||
# Change to the directory containing the CMD file
|
|
||||||
Set-Location $customDirectory
|
|
||||||
# Run the custom path CMD file
|
|
||||||
cmd /c $customPath
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Command file not found at custom path" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t max "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
@echo off
|
|
||||||
powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0run_max_worker.ps1"
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
Write-Host "Connecting to max..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$remoteCommand = @'
|
|
||||||
Write-Host "Checking current network connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nDisconnecting from NEXUS shares..."
|
|
||||||
# First disconnect from specific NEXUS shares
|
|
||||||
net use \\NEXUS\amazon /delete /y 2>$null
|
|
||||||
net use \\NEXUS\flamenco /delete /y 2>$null
|
|
||||||
net use \\NAS\amazon /delete /y 2>$null
|
|
||||||
# Then disconnect any mapped drives
|
|
||||||
net use A: /delete /y 2>$null
|
|
||||||
net use F: /delete /y 2>$null
|
|
||||||
net use N: /delete /y 2>$null
|
|
||||||
Write-Host "Existing NEXUS connections cleared."
|
|
||||||
|
|
||||||
$response = Read-Host "`nDo you want to stop any existing Flamenco workers? (y/n)"
|
|
||||||
if ($response -eq 'y') {
|
|
||||||
taskkill /IM flamenco-worker.exe /F 2>$null
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Worker process terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "No worker process found."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping network drives..."
|
|
||||||
Write-Host "Connecting drives to NEXUS..."
|
|
||||||
|
|
||||||
# First connect to the share without a drive letter
|
|
||||||
Write-Host "Establishing initial NEXUS connection..."
|
|
||||||
net use \\NEXUS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "Initial NEXUS connection established."
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
|
|
||||||
Write-Host "`nMapping A: drive..."
|
|
||||||
net use A: \\NEXUS\amazon /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "A: drive connected successfully."
|
|
||||||
|
|
||||||
Write-Host "`nMapping F: drive..."
|
|
||||||
net use F: \\NEXUS\flamenco /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "F: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect F: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect A: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to establish initial NEXUS connection" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nMapping N: drive..."
|
|
||||||
net use N: \\NAS\amazon /user:Nathan /persistent:yes
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-Host "N: drive connected successfully."
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to connect N: drive" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nVerifying connections..."
|
|
||||||
net use
|
|
||||||
|
|
||||||
Write-Host "`nStarting Flamenco worker..."
|
|
||||||
if (Test-Path "C:\Program Files\Blender Foundation\Flamenco 3.6") {
|
|
||||||
Set-Location "C:\Program Files\Blender Foundation\Flamenco 3.6"
|
|
||||||
if (Test-Path "flamenco-worker.exe") {
|
|
||||||
Write-Host "Running flamenco-worker.exe directly..."
|
|
||||||
# Run the executable directly in the console instead of using Start-Process
|
|
||||||
.\flamenco-worker.exe
|
|
||||||
# This line will only execute after the worker process terminates
|
|
||||||
Write-Host "Flamenco worker process has terminated."
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: flamenco-worker.exe not found in Flamenco directory" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Error: Flamenco directory not found" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to continue..."
|
|
||||||
Read-Host
|
|
||||||
'@
|
|
||||||
|
|
||||||
# Encode the command to handle special characters
|
|
||||||
$bytes = [System.Text.Encoding]::Unicode.GetBytes($remoteCommand)
|
|
||||||
$encodedCommand = [Convert]::ToBase64String($bytes)
|
|
||||||
|
|
||||||
# Execute the encoded command on the remote machine
|
|
||||||
ssh -t max "powershell -EncodedCommand $encodedCommand"
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "`nAn error occurred:" -ForegroundColor Red
|
|
||||||
Write-Host $_.Exception.Message -ForegroundColor Red
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "`nPress Enter to exit..."
|
|
||||||
Read-Host
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo Starting all worker CMD scripts...
|
|
||||||
|
|
||||||
start "Masterbox Worker CMD" cmd /c run_masterbox_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "i9-13ks Worker CMD" cmd /c run_i9-13ks_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "Max Worker CMD" cmd /c run_max_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "Echo Worker CMD" cmd /c run_echo_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
start "Blender-Boss Worker CMD" cmd /c run_blender-boss_cmd.bat
|
|
||||||
timeout /t 2
|
|
||||||
|
|
||||||
echo All worker CMD scripts started!
|
|
||||||
echo.
|
|
||||||
echo Note: Each worker will open in its own command window.
|
|
||||||
echo.
|
|
||||||
pause
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo Starting all Flamenco workers...
|
|
||||||
|
|
||||||
start "Masterbox Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0masterbox_worker1.ps1"
|
|
||||||
timeout /t 2 >nul
|
|
||||||
|
|
||||||
start "Blender-Boss Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0blender-boss_worker1.ps1"
|
|
||||||
timeout /t 2 >nul
|
|
||||||
|
|
||||||
start "Echo Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0echo_worker1.ps1"
|
|
||||||
timeout /t 2 >nul
|
|
||||||
|
|
||||||
start "Max Worker" powershell.exe -NoExit -ExecutionPolicy Bypass -File "%~dp0max_worker1.ps1"
|
|
||||||
|
|
||||||
echo All workers have been launched in separate windows.
|
|
||||||
echo You can close this window now.
|
|
||||||
Reference in New Issue
Block a user