We help IT Professionals succeed at work.
Get Started

Problem launching program in VBScript ASPX

thearniec
thearniec asked
on
563 Views
Last Modified: 2012-05-06
I am just trying to get a simple snippet of code to work for testing purposes, but I'm running into problem after problem.  

I am trying to have a program launch an application installed on the user's computer.  I'm thinking the problem may be that I have RunAt = Server, but not sure what other options I have.

Right now this code parses Ok, and seems to be correct, but whatever application I tell it to run it tells me the file cannot be found, when it is installed on the test system.

Any help would be GREATLY appreciated.
<%@ Page Language="vbscript" Debug="true" %>
 
<SCRIPT LANGUAGE="vbscript" RUNAT="Server">
public sub ButtonClick(sender As Object , e As System.EventArgs) Handles MyButton.Click
	Dim WshShell : WshShell = CreateObject("WScript.Shell")
	Dim strIPAddress
	WshShell.Run("C:\Program Files\Microsoft Office\Office12\WINWORD.exe")
end sub
</script>
 
 
 
 
 
<html>
<head>
<title>Test Launch</title>
</head>
<body bgcolor="white" text="black">
ddd
<form runat="server">
<asp:LinkButton OnClick="ButtonClick" ID="MyButton" Text="click me" Runat="server"> </asp:LinkButton> </body>
</form>
</html>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE