Solved

Launch vbs script that uses InternetExplorer.Application

Posted on 2011-02-18
6
579 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
[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
  • 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
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
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

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!

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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