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.
<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: