/    Sign up×
Community /Pin to ProfileBookmark

Executing a VBScript program client side

What’s the best way to run a VBScript file on a user’s local machine (from an HTML Form using a button)?

I’m trying to do something like add an appointment to (Microsoft) Outlook calendar when the user clicks a button. I have the VBScript that will do this; I just need a recommendation of the best way to run it from an HTML Form (if it’s even possible).

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@FangMar 25.2005 — VBscript only runs in IE, try running the script.
Copy linkTweet thisAlerts:
@mytrash_verizonauthorMar 25.2005 — Can you give me an example of HTML that would do this?
Copy linkTweet thisAlerts:
@the_treeMar 25.2005 — You'll kick yourself when you read this, but[B] I wouldn't recomend using it[/B]: it's IE only and gives you a little more control than a lot of users would be comfortable with.[code=html]<script type="Text/VBScript">
<!--
//-->
</script>[/code]
Copy linkTweet thisAlerts:
@ray326Mar 25.2005 — First, that's a really bad idea from a security standpoint. Only an idiot would allow a script or applet to do ANYTHING outside of the sandbox of the browser process.
Copy linkTweet thisAlerts:
@mytrash_verizonauthorMar 25.2005 — The VBScript is not embedded in the HTML. It’s a file on the client hard drive like c:hi.vbs. For example, saving:

msgbox “hi”

in hi.vbs using notepad and then clicking on it will generate a little message box that says “hi” (assuming Windows ME or later).

I’m aware of the security risks. The application is for a small LAN.
Copy linkTweet thisAlerts:
@phpnoviceMar 25.2005 — The VBScript is not embedded in the HTML. [/QUOTE]
The easiest way is to embed it into the HTML page. Basically, you make a [B]Function[/B] or a [B]Sub[/B] out of it and then execute it from the [B]onclick[/B] event of an HTML button. Otherwise, what is required to execute it is to create an instance of the Windows Script Shell in the browser and invoke your file that way. This is MUCH harder to do.
×

Success!

Help @mytrash_verizon spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...