8 Replies - 2284 Views - Last Post: 21 August 2012 - 10:52 AM

#1 pietomb00  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 68
  • Joined: 28-June 11

Automatically Save/run downloads

Posted 27 July 2012 - 08:08 AM

Hi All,

I'm trying to write a batch file that when run will download a .exe from a website and run it. I've managed to get it downlading from the web page my problem is that when you download something in IE it asks you if you want to Run it, Save it, or cancel. I've had a look around and the general consensus seems to be you can't tell it to automatically run the file mainly because of security issues (funny thing is the file I'm trying to download is anti-virus definition updates) So I'm going for saving it I think, as once it's saved I'll be able to run it from where it was downloaded too.

So does anyone know how I can either tell it to click Run or Save, or IE (or FF or chrome) automatically save the file without asking?

Also, I need to get yesterday's date, I am able to get today's but it doesn't seem possible to subtract one from that. I've had a look and found a few methods but they all take alot of lines of code (e.g. http://www.powercram...os-batch.html). Is there a simpler way?

Is This A Good Question/Topic? 0
  • +

Replies To: Automatically Save/run downloads

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9088
  • View blog
  • Posts: 34,139
  • Joined: 12-June 08

Re: Automatically Save/run downloads

Posted 27 July 2012 - 08:17 AM

Why are you definitions an EXE? That seems.. silly.
Was This Post Helpful? 0
  • +
  • -

#3 pietomb00  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 68
  • Joined: 28-June 11

Re: Automatically Save/run downloads

Posted 27 July 2012 - 08:22 AM

haha I totally agree but I'm not really sure it's just Symantec being...well Symantec :P

It's not quite just definitions, there are a few other bits so I guess they figured the easiest way to get everything in the right place was to use exe's.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9088
  • View blog
  • Posts: 34,139
  • Joined: 12-June 08

Re: Automatically Save/run downloads

Posted 27 July 2012 - 08:24 AM

So you are getting an update to their application then? Okay.. now if this is Symantec the question becomes - why isn't *THEIR* software already schedule to get/install updates?

I am trying to get a handle on your problem space here..
Was This Post Helpful? 0
  • +
  • -

#5 pietomb00  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 68
  • Joined: 28-June 11

Re: Automatically Save/run downloads

Posted 27 July 2012 - 08:57 AM

Yep that's right, I'm updating Symantec anti-virus.

So yes it should do it itself, but I have six machines running it and they're not all always connected to the internet or on, so Live Update (Symantecs thing to get it's own updates) doesn't seem to work when they are on and connected.
I haven't been able to get any help from them so have been downloading and running the update manually, which is why I'm trying to get it to do it itself now.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9088
  • View blog
  • Posts: 34,139
  • Joined: 12-June 08

Re: Automatically Save/run downloads

Posted 27 July 2012 - 09:02 AM

Yeah we have had that problem in my office as well.. but the solution was just set the update to a daily check.. so if the laptop is dormant for a month the next turn on it gets the updates. We were going to go the route of some funky active directory attempts, but it came down to just using the tools provided and not going off the reservation too far for something trivial. Haha..
Was This Post Helpful? 0
  • +
  • -

#7 pietomb00  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 68
  • Joined: 28-June 11

Re: Automatically Save/run downloads

Posted 27 July 2012 - 09:17 AM

Hmm, I've set that up, so will give it a go. Unfortunately Live Update doesn't run properly when I do it manually, so will be quite suprise if it does automatically, but fingers crossed :D
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9088
  • View blog
  • Posts: 34,139
  • Joined: 12-June 08

Re: Automatically Save/run downloads

Posted 27 July 2012 - 09:21 AM

eh.. it worked for us... of course we did that with windows updates so if some poor schmuck got the laptop that was at the bottom of the pile and turned it on the updates went nuts for about an hour... :)
Was This Post Helpful? 0
  • +
  • -

#9 AVReidy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 65
  • View blog
  • Posts: 431
  • Joined: 17-February 11

Re: Automatically Save/run downloads

Posted 21 August 2012 - 10:52 AM

I'm not sure if it's a great idea to automatically run downloads, but here's what I would do. (Forgive me, I don't really know batch, so I'll use Python).

You could run everything that enters the Downloads folder like this:
import os
import time

while(True):
	time.sleep(10) # Only execute every 10 seconds
	os.system("*.exe") # Run all executables


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1