opening windows apps in html

Currently reading:
opening windows apps in html

jug

blessed are the apostates
Joined
Nov 28, 2005
Messages
27,935
Points
3,763
Location
Durham
ok, the scenario, i'm developing the intranet at work. on the intranet there is a hyperlink using the following code:

<a href = "runprogram.hta"><IMG SRC="modifymaplogo.jpg" ALT="Modify a Process Map" border="0"></a>

this hyperlink opens runprogram.hta, an html application containing the following code:

<html>
<script language="VBScript">
Sub RunProgram
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "MSTSC aether.rdp"
End Sub
RunProgram
window.close()
</script>
</html>

this code creates a shell object and runs remote desktop connection from there, before closing the hta. remote desktop connection uses a file "aether.rdp" when it runs (to use a specific server and application).

if i open runprogram.hta in windows it works as expected. but when the hyper link is used to open runprogram.hta it no longer runs remote desktop connection. the hta still opens and closes, but without running remote desktop connection. it does not work if i try it locally or on a server. i also tried removing window.close() incase it wasnt giving remote desktop connection time to run, but that didnt help either. first prize to anyone who can figure out why the hta wont open remote desktop connection if i use a hyperlink to open the hta.
 
Last edited:
Why not just use the Web interface for mstsc.exe? Thats what im assuming your trying to do? use a webpage to launch a Remote Desktop connection ?.

http://www.dslwebserver.com/main/fr_index.html?/main/sbs-remote-desktop-web-host.html

01.gif


I used the said method so external staff could log into our network using that so they can use ACT8 without us having to buy the Coporate license :D.
 
Last edited:
A browser won't have permissions to launch a shell object - if it could, everyone would be executing the "format" command on peoples machines...

correct a browser wont, which is why a hta file (html applic) is needed. a browser can open an hta, and an hta can open any application, but the user must click OK to run the hta in the first place (unless the intranet security settings are changed to trust my intranet, which they are).
 
I've noticed that on some Windows Updates and at some point during computer use, a lot if the XP services set themselves to Disabled.

I presume its for security reasons, Programs like Remote Assistance and MESSENGER service are disabled, I'm presuming Windows done it at some point without notification.

Maybe the service has been disabled so it wont work :confused:
 
the web interface worked (y)
and with a bit of tinkering (& deleting 90% of the html) i got it to automatically open a certain applic on a certian server (meaning you dont even see the white screen in the htm as shown above, and preventing access to windows desktop on the server, and most importantly making it idiot proof).

hooray!
 
Last edited:
the web interface worked (y)
and with a bit of tinkering (& deleting 90% of the html) i got it to automatically open a certain applic on a certian server (meaning you dont even see the white screen in the htm as shown above, and preventing access to windows desktop on the server, and most importantly making it idiot proof).

hooray!

Glad it helps I found it very useful in my last job :). Its good to demonstrate software and stuff at a clients premisis too and its 98% secure too :).
 
Back
Top