hta/ javascript How to execute an application with relative path
Posted
by
user1644062
on Stack Overflow
See other posts from Stack Overflow
or by user1644062
Published on 2012-12-12T15:55:35Z
Indexed on
2012/12/12
17:04 UTC
Read the original article
Hit count: 766
I'm building a .hta (with javascript) from which i want to launch several applications.
But when i execute my .hta i get the error message can't find file
this is the code:
<script type="text/javascript" language="javascript">
function RunFile(path) {
var relpath = window.location.href;
var fullpath = relpath + path;
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run(fullpath, 1, false);
}
RunFile("\file.exe");
</script>
© Stack Overflow or respective owner