Jump to content

Install PDQ Deploy..used the script template from the other scripts here


DigitalDentist

Recommended Posts

## Downloads latest PDQ from Company Dropbox and silently installs or updates if already installed


# Path for the workdir
$workdir = "c:\installer\"

# Check if work directory exists if not create it

If (Test-Path -Path $workdir -PathType Container)
{ Write-Host "$workdir already exists" -ForegroundColor Red}
ELSE
{ New-Item -Path $workdir  -ItemType directory }

# Download the installer
$url = "https://www.dropbox.com/PDQ13.exe?dl=1" # Put your Url with the file here..I use dropbox, you can use whatever file hosting service.
$destination = "$workdir\pdq13.exe"
# Check if Invoke-Webrequest exists otherwise execute WebClient

if (Get-Command 'Invoke-Webrequest')
{
     Invoke-WebRequest $url -OutFile $destination
}
else
{
    $WebClient = New-Object System.Net.WebClient
    $webclient.DownloadFile($url, $destination)
}

# Start the installation

Start-Process -FilePath "$workdir\PDQ13.exe" -ArgumentList "/S" # name this whatever your EXE is called

# Wait XX Seconds for the installation to finish

Start-Sleep -s 15

# Remove the installer

rm -Force $workdir\PDQ13*

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...