Solved

Trying to download a file using BITSadmin (or anything that will work, per your recommendation)

Posted on 2014-03-29
8
2,325 Views
Last Modified: 2014-04-15
I never was that great with scripting... I am trying to perform the following remotely:

1.

Download an executable file from my website, http://itworksllc.net/downloads/EXECUTABLE.exe

2.

Using another script, execute the file
The second step is a script that was provided to me by N-able, the application I'm trying to remotely download. The end-game is that I'm currently using a tool called GFI Max RemoteManagement. I'm switching from GFI to N-able and want to automate the N-able deployment.

When I run my BITSadmin script, I am presented with an error message:

C:\PROGRA~2\ADVANC~1\scripts>bitsadmin.exe /transfer "N-able" http://itworksllc.net/downloads/EXECUTABLE.exe C:\Windows\TEMP\EXECUTABLE.exe 

BITSADMIN version 3.0 [ 7.5.7601 ]
BITS administration utility.
(C) Copyright 2000-2006 Microsoft Corp.

BITSAdmin is deprecated and is not guaranteed to be available in future versions of Windows.
Administrative tools for the BITS service are now provided by BITS PowerShell cmdlets.

Unable to complete transfer.
ERROR FILE: http://itworksllc.net/downloads/EXECUTABLE.exe -> C:\Windows\TEMP\EXECUTABLE.exe
ERROR CODE: 0x80200013 - The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.

ERROR CONTEXT: 0x00000005 - The error occurred while the remote file was being processed.

Open in new window


I don't care how I download the file. I need to be able to use Windows 7 to download this file. I may also need to download it on Vista or XP. GFI states: Supported script types: js, vbs, cmd, bat, pl, php, py, rb, ps1

Obviously the computer needs to be able to support these types of scripts... Assume these are out of the box versions of Windows 7 - both Home and Professional.

Hopefully someone can help!
0
Comment
Question by:ITworks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 3

Expert Comment

by:telczj9
ID: 39963805
I not quite sure if I understand correctly what you are trying to do remotely.  However if you just want to download a file from the internet via a scrip on a windows system, get the wget.exe utility from the internet.

Then in a batch file write:
@echo off
Echo download file
wget -O EXECUTABLE.exe http://itworksllc.net/downloads/EXECUTABLE.exe

Open in new window


Cheers!
0
 
LVL 4

Author Comment

by:ITworks
ID: 39963811
I need to be able to perform the download on 90 computers that are on separate networks. It wouldn't make sense for me to figure out how to deploy wget to all of them (some don't even have servers/domains) when I could just deploy n-able to all of them individually.

I'm really hoping to get a script that will allow me to download a file from the internet across all of these devices.
0
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39963834
Using Powershell:
$source = "http://itworksllc.net/downloads/EXECUTABLE.exe"
$destination = "C:\Windows\TEMP\EXECUTABLE.exe"

$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source, $destination)

Open in new window

HTH,
Dan
0
Retailers - Is your network secure?

With the prevalence of social media & networking tools, for retailers, reputation is critical. Have you considered the impact your network security could have in your customer's experience? Learn more in our Retail Security Resource Kit Today!

 
LVL 4

Author Comment

by:ITworks
ID: 39963849
I think the extension for that is just .ps right?
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39963859
.ps1, usually
0
 
LVL 4

Author Comment

by:ITworks
ID: 39963867
Got it. So I right clicked the PS1 and selected "Run in PowerShell" to see if it would work. I was asked if I want to trust the script. I guess I just assume this will happen on all of the workstations I try to run this on remotely. Any way around this?

PS1 screenshot
I am testing it on a Windows 8 machine - I guess I should clarify that most endpoints are Windows 7, so just let me know if this won't apply on Windows 7.
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39963898
You can run it like this, from the command prompt:
powershell.exe -ExecutionPolicy Bypass &'X:\path\to\script.ps1'

Open in new window

0
 
LVL 4

Author Comment

by:ITworks
ID: 39966240
GFI is so frustrating... I can only do all of this with a single script.  >:(
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question