Archive: Start Prog


Start Prog
Hi all,

I found some code to run an exe from HTML. But I really am not into Java or things like that. I succeeded in starting a prog, but now I want to do the following. I want to allow users to select (browse) a file or prog and start it by clicking "GO". But apparently, the program started by the script (attached) will be downloaded into "Downloaded program files" and those files cannot find their own dir anymore.

So I wrote some small NSIS app that can be started with a command line (the prog to be executed) and creates a shortcut with the proper working dir to allow for the program to be executed correctly. This works fine, but my problem is: Can I execute the NSIS prog with as command line "document.f.q.value" (where f=form, q=browse edit box)?

And how should I adapt the source of the HTML? I already tried something, but I didn't start the prog anymore, so, no luck for me yet. Maybe someone can give me a hint???

Thx, greetz, Hendri.


Sweet. Good Luck.

-Duane


So,

that's not helping me very much...

-Hn3.


Howzabout this then. The "Browse" file feature for HTML has been around for a while. The Stuff is sounds like you are trying to do is for CD-ROM execution and do it with out having to open up the save/execute file items from Netscape/IE. This has been done before (i.e. the Incite CD-ROM) but they used Flash. Which uses the JavaScript/ActionScript items.

Hope that helps launch some ideas.

-Duane


Duane,

indeed, I'm trying to reconstruct "Start Menu - Run" in an HTML environment, because I want to post this on the Active Desktop. This way, anyone can launch any program from the desktop (after browsing to it). The script available now is already capable of launching programs, but the problem is, that these programs will be downloaded to "Download program files" and hence, they cannot find there own dir and files anymore.
So I created this NSIS app that launches a shortcut with the proper working dir. But how to get the name of the files to be executed from the script to my NSIS app?

My idea: post as commandline for the NSIS exe (how?), write in reg (can Java do this?) or write a temp text file (how?).

If anyone has idea, I would be really great!!!

Thx in advance, Hn3.


Look at $CMDLINE in the docs. It will contain the commandline.


Robert,

I know that. My NSIS script is finished already and it works (it's not that difficult actually), but I was wondering I anyone could help me get information from a form in HTML to the commandline for the NSIS EXE. I can start the exe from HTML, but I cannot yet send a second commandline argument to the EXE from the HTML/Javascript...

Maybe now the problem is a bit more clear...
For anyone interested in the script and the current program visit my homepage and download ToDoList.

Robert, everyone, thx anyway for the thought,
greetz from Holland,
Hendri.


If you are using get to send the form then you can get the value in Javascript the url (location.href).


Robert,

I do not understand the answer. Maybe you can verify below if this will work for me.

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 5">
<title>Welcome to Adobe GoLive 5</title>
</head>
<body bgcolor="#ffffff">
<SCRIPT>
function linkit(filename)
{
strpagestart = "<HTML><HEAD></HEAD><BODY><OBJECT CLASSID=" +
"'CLSID:15589FA1-C456-11CE-BF01-00AA0055595A' CODEBASE='";
strpageend = "'></OBJECT></BODY></HTML>";
runnerwin.document.open();
runnerwin.document.write(strpagestart + filename + strpageend);
window.status = "Done.";
return false;
}
</SCRIPT>
<IFRAME ID=runnerwin WIDTH=0 HEIGHT=0 src="about:blank"></IFRAME>
<form name="f" action="">
<input type="file" name="q" size="10" value=""><input type="submit" value="Go" onclick="return linkit(document.f.q.value);">

<!--so instead of prob.exe I would like to link to 'prob.exe /f=document.f.q.value' (an extra commandline argument).
With the current script this is not possible. But maybe there are other possibilities:
Write document.f.q.value to a textfile using Javascript.
How should I do this? Or is it possible to send a second commandline argument to the exe? How?-->

</form>
</body>
</html>

I hope this makes things a bit clear.

BTW, ToDoList is created using NSIS. Great menu and really small exe!

Thx for thinking, greetz,
Hendri.