Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

execute .cmd from javascript?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
TWILL

TWILL

    Junior

  • Member
  • Pip
  • 76 posts
  • Joined 16-November 03
Can someone tell me how I can call a .cmd file from a javascript file.

Ive tried this but doesnt work.

Here is the js file called install.js

function install()
{
document.location.href="file:///c:/install/install/cmd";
}


here is how I am calling it from a .hta file.

<HEAD>
<script language="javascript1.2" src="./install.js"
type="text/javascript"
APPLICATION="yes">
</SCRIPT>
</HEAD>

...
...

<a href=""><img src="button.gif" onclick="install();"></a>

Ive based this off the windows post install wizard someone posted a few months back. I cant seem to find the post. It does everything I want except execute the install.cmd as it actually was made for unattended install.


TWILL


How to remove advertisement from MSFN

#2
TWILL

TWILL

    Junior

  • Member
  • Pip
  • 76 posts
  • Joined 16-November 03
Nevermind, I found the typo in the code.

I also have an alternative so this method I was trying had been abandoned.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users