Solved

Launch vbs script that uses InternetExplorer.Application

Posted on 2011-02-18
6
580 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 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