473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Launch MSTSC from SHTML Page.

The following code will not work in my shtml page at all and I can not
figure out the reason. I get the error that there is a "Type Mismatch
'Launch'" when i click the button.

If i change the server side include to the acutaly ip it works great. I
just can not get it to work with the server side inclue. Any help would
be greatly appreciated! Thanks Everyone!

<p>Test</p>

<input type="BUTTON" name="Write" value="Click" language=VBS
onclick="Launch">

<script language="vbscript">
Sub Launch
Set oShell = CreateObject("WScript.Shell")
oShell.run "mstsc.exe /v <!--#include file="currentid.txt"-->"
Set oShell = Nothing
End sub
</script>

Jan 13 '06 #1
5 9642
Frank wrote:
If i change the server side include to the acutaly ip it works great.


View the source when you have the IP hard coded.
View the source when you use the SSI
What's different?

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jan 13 '06 #2
>View the source when you have the IP hard coded.
View the source when you use the SSI
What's different?


The terminal that the mstsc is attempting to connect to has a dynamic
dhcp address. So from time to time it changes. (It can not be static).
The termianal checks its ip and uploads a txt file called currentid.txt
to the webserver from time to time. So in the shtml page has a line in
it <!--#include file="currentid.txt"-->" to show me the ip on the
page.

SO now i wanted to have a button laucnh a connection to the terminal
via mstsc. As i showed in the code oShell.run "mstsc.exe /v
<!--#include file="currentid.txt"-->" will not work. It will only work
if i take what the current ip is and hard code it into the shtml page.

Does that clear things up?

Jan 13 '06 #3
When i view the source they look the same but the SSI will not work for
some reason.

Jan 13 '06 #4
Frank wrote:
When i view the source they look the same but the SSI will not work for
some reason.


You wouldn't be comparing a static document served directly from your hard
disk with a dynamic document served from a webserver would you?

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jan 13 '06 #5
Frank wrote:
oShell.run "mstsc.exe /v <!--#include file="currentid.txt"-->"


At a guess, currentid.txt contains a few "extra characters" that shouldn't
be there -- perhaps a line break at the end?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jan 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Darren | last post by:
I receive the error: Object Required: MsTsC when trying to connect remote desktop web connection...the "non-web" connection works perfectly (i.e. just launching mstsc and connection directly...
10
by: scott | last post by:
From an asp page, i'm trying to auto-open a pop-up page if something exists. I can do this within access via vba using below code. Anyone know how I could modify the below js to auto-lauch from...
4
by: Caroline | last post by:
I'd like to launch an executable file from a web page. Basically, the user enters seven parameters and then clicks a button to generate a graph. The input is written to a file and then read by...
1
by: Jacob | last post by:
I have several web apps that I want to redirect to a new page, but have that page open in a new browser window. The basic scenario is that I have a CrystalReport object that gets created and...
7
by: dinamointer | last post by:
Could you help me in this problem: I want to launch an exe file(executable jar file) from a web page. I use jsp...and i cannot use vbScript...? could u tell me how should i do it? Thanks
11
by: David Thielen | last post by:
Hi; In a page, when the user clicks on a button, I want to validate all the controls (in the code behind) and then if they are good, leave that page alone and launch a new window with a new url...
7
by: dongarbage | last post by:
Hi there, I'm very new to activex controls and c# programming. I'm writing a c# application and I want it to be invoked when my users click a button on a web page. Its an application with a...
6
by: efultz | last post by:
I am trying to figure out how to click on a button and have it open a web page. I am not asking for the logic to handle the click. Moreover I am looking for the logic that I need to run to actually...
1
AnuSumesh
by: AnuSumesh | last post by:
Hi All, Can anyone tell me that whether mstsc.exe file exists in windows 95/98/2000 or not? Thanks, Anu
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.