?
Solved

Script to download and execute a VB exe

Posted on 2004-03-23
11
Medium Priority
?
536 Views
Last Modified: 2010-04-06
I have been tasked with designing and writing a simple patching program/script which will 1) download an executable from a website, 2) shut down all instances of a particular program, 3) overwrite the program's exe file with the downloaded version, and then 4) restart the program.  I am assuming that the "shut down all instances" part requires an exe, unless there is some scripting language which can do so and will work on all versions of Windows 98+ and NT 4.0+.

So, unless all of the above can be done by a script, I will write a VB application that will do the above.  What I want to know is if there is some sort of script I can use so that the user can click on a link and not have to do anything else.  I.e. it is most preferable for the user to not even click "open" to download the exe -- the user would just click a link, and the program would download and run.  It is imperative that the script require no "extra" components installed on the system, where "extra" denotes anything other than the standard VB runtimes (the patch is for a VB program, so the runtimes will already be installed) and what all versions of Windows later than '98 have installed by default.
0
Comment
Question by:labreuer
[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
  • 5
  • 2
  • 2
  • +1
11 Comments
 
LVL 6

Assisted Solution

by:sforcier
sforcier earned 1000 total points
ID: 10661382
I'm pretty sure the only way to do this is to create an ActiveX control that web visitors would be prompted to download when they click the link. Otherwise, this would be a big security risk. I'm sure someone will sound off if I'm wrong.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 1000 total points
ID: 10661472
It cannot be done with just script.  You will at the very least need an activeX control.  If this is for an Intranet you can probably build an HTA that will fully automate it, but if it is going across the Internet, there is virtually no chance that you will bet it work without user interaction, and it will get block at many firewalls.

Cd&
0
 
LVL 1

Author Comment

by:labreuer
ID: 10661709
So basically the user would have to click "ok" in some form or another regardless of how this is done, so simply having him/her click on a link to an executable and telling him/her to choose "open" is the simplest solution?
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 6

Expert Comment

by:sforcier
ID: 10661812
basically, yes.
0
 
LVL 1

Author Comment

by:labreuer
ID: 10662057
Keeping this open for a day; if nobody says it's possible (and shows how), I'll split the points between you two.
0
 
LVL 4

Expert Comment

by:JNSTAUB
ID: 10665779
why not performing like MS, and let download a ZIP with the exe and a readme indicating to shut down the application, request the application path and so one.
0
 
LVL 1

Author Comment

by:labreuer
ID: 10667314
More work for the user -- remember, the goal is to make the process as simple as possible for the user.  The application is relatively stateless, so it is quite reasonable to simply shut all instances down.

The application is already written (it took ~3 hours).
0
 
LVL 4

Expert Comment

by:JNSTAUB
ID: 10667598
so download a program (.exe) which run a script on the user machine to perform all the task.but the exe sould be launch manually by the customer.
did you agree that microsoft patchs our os without your approval?

0
 
LVL 1

Author Comment

by:labreuer
ID: 10668769
JNSTAUB: try reading my last post (I said the application was already written to do the patching...)  I'm sorry if I were not clear enough.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 10679264
Sorry we could not come up witha real solution for you.  Thanks for the A.  :^)

Cd&
0
 
LVL 1

Author Comment

by:labreuer
ID: 10679932
Well, you said it wasn't possible and gave a good reason, which made the solution obvious.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

801 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