Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Program on local PC

Status
Not open for further replies.

Hap007

MIS
Mar 21, 2003
1,018
US
Hi,

Is there anyway to start an application on a local PC using HTML code?

Example might be:

Run Notepad or MS Word

I need a Button or link that runs a program, on a local PC, from the IE browser and it must be done using HTML. Ideally the command would include the program to run and a command string. Something like 'Notepad passname.txt'

Thanks,
Hap...

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Nope.

You could achieve this using javascript with an ActiveX object, but then you're limited to IE only, and only on windows systems (which probably isn't a big deal if you're trying to open notepad).

Additionally, ActiveX pops up a security message in the browser and requires the user's permission to run. This will scare away a lot of users.

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
btw, if you feel that the ActiveX security warning and only working in IE are acceptable, then here's the answer to your original question:
Code:
<script type="text/javascript">
var blah = new ActiveXObject("Wscript.Shell");
blah.Run("notepad.exe");
</script>
Although I'm sure you can idenfity the security warnings here, "notepad.exe" could just as easily have been a delete or format command.

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top