Solved

Launch vbs script that uses InternetExplorer.Application

Posted on 2011-02-18
6
578 Views
Last Modified: 2012-05-11
I have a asp .net application, where I need to launch an external site and perform a user login on that external site.

The way I did it was through vb script (.vbs file). I create a .vbs file (plain text) on the server, and let the web user download it and then they launch/run the vbs script and it does the login, so that all works fine.

The problem is that I don't want the user to download/Open the vbs file. The main problem is that when they download the text file, they can open it and view it's contents, plus the additional step of choosing "Open" or "Run" is not very intuitive/user friendly.

Is there a way I can run the vb script file without giving them an option to save it, or is there a way to do this any other way besides vb script? Again, the main goal is for my website to launch an external website and perform a login. I have seen some website somehow run scripting on external sites with just a click on their site. Not sure how its done, but that's what I need to do.
0
Comment
Question by:CAR-RESEARCH
  • 3
  • 3
6 Comments
 
LVL 14

Expert Comment

by:spiderfix
ID: 34941093
Inno Setup
http://www.jrsoftware.org/isinfo.php

It's free and ½ the developers in the World use it to create install packages.

You can set your *.vbs in the [Run} section of Inno and compile (build) an *.exe
You can "shave" the options down to a minimum so it has the lesser appearance of a program install.

This may not be the invisible type of execution you were looking for your *.vbs but it covers the area where you don't want your script readable.
Whether the user selects RUN or SAVE AS they will not be able to see any *.vbs script.
0
 

Author Comment

by:CAR-RESEARCH
ID: 34943553
I'll try it, but I'd still like to run the script without having any user interaction. Can this be done through javascript?
0
 
LVL 14

Expert Comment

by:spiderfix
ID: 34950086
JavaScript is not likely possible. If it were that easy we’d have virus running rampant with 70% of the
Web’s page loading.

Everything "inbound" is destine for some type of interaction from either the OS or other security stops.
Many  Vista and 7 users still have UAC enabled so you can’t even start a local browser without a halt
and a few buttons offered.

About the "quietest" way to bring something in is via FTP. Evoking it [once it's in] still has some issues
especially involving an executable like a VBScript.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:spiderfix
ID: 34950102
If you can get your *.vbs into batch form you can run the batch file pretty much out-of-sight.
ss.bat fired up by *.vbs blindscript here as an example.

const blindscript = "ss.bat"
dim scriptobject, alienobject
set alienobject = CreateObject("Scripting.FileSystemObject")
set scriptobject = WScript.CreateObject("Wscript.Shell")
if not alienobject.FileExists(blindscript) then
 MsgBox "No script exists in that location!", vbOkOnly + vbCritical, "Error"
 WScript.Quit
end if
scriptobject.run blindscript, 0

Open in new window

0
 

Accepted Solution

by:
CAR-RESEARCH earned 0 total points
ID: 35975644
No solution found in above. I ended up writing a small program that installs on the client's machine to do this.
0
 

Author Closing Comment

by:CAR-RESEARCH
ID: 36001502
No other answer applied
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

679 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