473,568 Members | 2,850 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="vbscr ipt">
Sub Launch
Set oShell = CreateObject("W Script.Shell")
oShell.run "mstsc.exe /v <!--#include file="currentid .txt"-->"
Set oShell = Nothing
End sub
</script>

Jan 13 '06 #1
5 9654
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
1253
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 to an IP)... I believe that the problem might exist in my connect.asp
10
1749
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 asp? sPage = "javascript: resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/myweb/mypopup.asp" sApp = "c:\Program...
4
5195
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 the exe. The exe then generates a graph based upon the input parameters. I am reading about the Process class and wondering if that is the best...
1
2182
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 displayed on-screen as a .PDF stream. I need to have this page launch in it's own window leaving the first browser alone Here's the code I'm using to...
7
6160
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
1662
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 also. This is what I think is the best approach - please let me know if there is a better one: In my code behind I validate everything.
7
4662
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 GUI so the app would come up and be running independent of the web browser (i.e. not embeded in it). Also note, that this application is one that is...
6
2319
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 launch the web page. I have found quite a bit of documentation talking about how to open a file using a URL but almost none talking about how to...
1
5878
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
7916
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8117
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5498
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.