Category filter
Script to download and install Enterprise app (EXE) from its download link
Enterprise apps are apps that are tailored to meet the needs of an organization. Hexnode users can deploy scripts to download and install such apps on Windows 10 devices.
Batch Script
1 2 |
bitsadmin.exe /transfer "Name_of_the_process" give_the_download_url give_the_name_and_path Start here.exe |
E.g., To install a program abc.exe in the Desktop of the user Deborah,
bitsadmin.exe /transfer "abctransfer" http://download.url/abc.exe C:\Users\Deborah\abc.exe
Start C:\Users\Deborah\abc.exe
Powershell Script
1 2 3 4 5 6 7 8 9 10 11 12 |
$file=’desired_name’ $url=’downloadable_link’ Invoke-WebRequest –Uri $url -OutFile $file $installProcess =(Start-Process $file –Wait) if (installProcess.ExitCode-ne 0){ Write-Host ‘Installation failed’ exit installProcess.ExitCode } else{ Write-Host ‘Installation successful’ } |
E.g., To install a program abc.exe
$file=’abc.exe’
$url=’downloadable_link’
Invoke-WebRequest –Uri $url -OutFile $file
$installProcess =(Start-Process $file –Wait)
if (installProcess.ExitCode-ne 0){
Write-Host ‘Installation failed’
exit installProcess.ExitCode
}
else{
Write-Host ‘Installation successful’
}