Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a script then closing the window.....

Status
Not open for further replies.

JonMusto

Programmer
Aug 3, 2004
34
GB
Hi,

Can anyone help me? I've got the following javascript which opens a program on my local machine:

function LaunchHydra()
{
var launcher = new ActiveXObject("Shell.Application");
launcher.ShellExecute("C:\\Program Files\\Hydra\\hydra32.exe", "", "", "open", "1");
}

What i want to do is have a blank web page, that when opened, runs this script to open the program, and then closes its self down afterward. In theory i dont want the page to be seen, i just want it to have the effect of opening the program.

I'm then going to link to this page from a html email in outlook, because i'm having trouble running javascript functions from outlook.

Any help anyone could give me would be much apreciated, i'm quite new to javascript... I'm sure what im trying to do is really easy and can be done in a few lines but i dont have a clue...

Thanks in advance....

 
I don't really know if this will do things as you expect... but it can't hurt to try:

Code:
function LaunchHydra()
{
var launcher = new ActiveXObject("Shell.Application");
launcher.ShellExecute("C:\\Program Files\\Hydra\\hydra32.exe", "", "", "open", "1");
self.close();
}

Cheers,
Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top