Click to See Complete Forum and Search --> : Running Program on Client


leighton76
11-24-2002, 09:32 PM
Hi all,
I have the following code
runApp("\"C:\\Program Files\\Adobe\\Photoshop 6.0\\Photoshp.exe\"", 1, 1);

where runApp is:

function runApp(PathToApp, WindowStyle, Block)
{
var oShell = new ActiveXObject("WScript.Shell");
var ret = oShell.run(PathToApp, WindowStyle, Block)
oShell = null;
if(Block) return ret;
return;
}

The script is supposed to open photoshop on the PC when a person clicks on a button. This code works when the script is run on a persons c: drive. However when the script is ran from a network drive ie J: it no longer works, How can this problem be remedied

Tahnks

leighton76
11-24-2002, 10:51 PM
Thanks DAve but unfortunately it did not seem to work, I think the skript wants to run the program from the root directory which in this case is the J drive when it should be the C drive (persons own computer)

Charles
11-25-2002, 06:08 AM
This sounds like a security feature. I wouldn't want a remote page to be able to run programs on my desktop.

leighton76
11-25-2002, 06:22 AM
The page is a launcher page for a internal intranet so the page is only available inside this organisation. People are supposed to go to this page cilick on this a a number of other options and presto all the applications will open. I think they want it so the process of opening apps automated (mainly because most people don't use computers much or they are just lazy)

Charles
11-25-2002, 06:37 AM
I didn't mean to suggest that you were doing anything improper, only that I think that MSIE might think that you might be. Perhaps you need to allay its fears somehow. Try playing around with the security settings.

leighton76
11-25-2002, 06:40 AM
Thanks Charles Ill give it a shot. I am also now trying to experiment with a batch file in the hope that maybe it will work