Solved

Launch vbs script that uses InternetExplorer.Application

Posted on 2011-02-18
6
566 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now