calling a windows application (from hyperlink?)

B

bob

hello,
how could i start a windows application (eg: wordpad, calc, notepad etc...)
from a html page?

thanks
bob
 
B

bob

hi guys,
the idea behind this is to create a cd-rom that auto starts with a html page, then i want to have links that open notepad... etc
the page that opens these applications would have a light description of it's basic functions.
i fully understand the problem behind an application starting from a link but i don't neccessarily want to avoid the popup dialog box (this would be a nice feature to this presentation though) i just want to access these applications from local hard drive of the users computer rather than imbedding these applications into the cd-rom and having possibly infringed a law or something.

so, would i have to create a link to notepad of /windows/notepad.exe (of which i would have to have another link for win2000 systems - /winnt/notepad.exe etc...) or could i call it via something like... run/notepad.exe/x/x ?

p.s. Andrew that popup notepad thingy is pretty cool...
 
B

bob

this sort of thing is what i'm looking for:

javascript:('FindApp(NOTEPAD.exe)';



hi guys,
the idea behind this is to create a cd-rom that auto starts with a html page, then i want to have links that open notepad... etc
the page that opens these applications would have a light description of it's basic functions.
i fully understand the problem behind an application starting from a link but i don't neccessarily want to avoid the popup dialog box (this would be a nice feature to this presentation though) i just want to access these applications from local hard drive of the users computer rather than imbedding these applications into the cd-rom and having possibly infringed a law or something.

so, would i have to create a link to notepad of /windows/notepad.exe (of which i would have to have another link for win2000 systems - /winnt/notepad.exe etc...) or could i call it via something like... run/notepad.exe/x/x ?

p.s. Andrew that popup notepad thingy is pretty cool...
 
B

bob

i'm thinking something like:

file:///%systemroot%/NOTEPAD.EXE

although this doesn't work file:///C:/windows/NOTEPAD.EXE does. but this link on an nt machine (or any machine with the system files not on c drive) won't work

any ideas?


this sort of thing is what i'm looking for:

javascript:('FindApp(NOTEPAD.exe)';



hi guys,
the idea behind this is to create a cd-rom that auto starts with a html page, then i want to have links that open notepad... etc
the page that opens these applications would have a light description of it's basic functions.
i fully understand the problem behind an application starting from a link but i don't neccessarily want to avoid the popup dialog box (this would be a nice feature to this presentation though) i just want to access these applications from local hard drive of the users computer rather than imbedding these applications into the cd-rom and having possibly infringed a law or something.

so, would i have to create a link to notepad of /windows/notepad.exe (of which i would have to have another link for win2000 systems - /winnt/notepad.exe etc...) or could i call it via something like... run/notepad.exe/x/x ?

p.s. Andrew that popup notepad thingy is pretty cool...
 
R

rf

bob said:
i'm thinking something like:

although this doesn't work file:///C:/windows/NOTEPAD.EXE does. but this
link on an nt machine >(or any machine with the system files not on c drive)
won't work
any ideas?

Somebody gave you one. view-source:. Of course you have to fiddle around
with the URI as view-source: demands a full URI, not a relative one.

http://users.bigpond.net.au/rf/test/notepad.html

You will need to tweek it to get it to work properly in Mozilla.

BTW could you *please* switch off the HTML in your newsreader.

Cheers
Richard.
 
R

rf

rf said:
this
link on an nt machine >(or any machine with the system files not on c drive)
won't work


Somebody gave you one. view-source:. Of course you have to fiddle around
with the URI as view-source: demands a full URI, not a relative one.

Belay that. I re-read the thread and discovered that you wish to start any
one of a number of programs. Well sorry but you are out of luck with a
browser. You can not call an .exe without the download/open dialog poping
up. The browsers have security code in them to specifically stop this.

There are activeX controls out there that will allow you to do this but the
user has to install the control.

Cheers
Richard.
 
B

bob

hi richard,
having the dialog box pop is not the issue, most replies
have stated this can't be done and i don't have a problem with that.

i am creating a cd-rom and i want to put links on an auto start html
document that open some of the windows applicatioins like paint etc...

i can call them with file:///C:/WINDOWS/NOTEPAD.EXE but if i am to run
this on a number of windows platforms (eg: nt and win2000 would need to call
it via file:///C:/WINNT/NOTEPAD.EXE ) it won't work.

now i figure if i use something along the lines of:
file:///%systemroot%/NOTEPAD.EXE (although this does not work for me), the
link would work for any windows revision.

any ideas?

regards
 
R

rf

bob said:
hi richard,
having the dialog box pop is not the issue, most replies
have stated this can't be done and i don't have a problem with that.
OK.

i am creating a cd-rom and i want to put links on an auto start html
document that open some of the windows applicatioins like paint etc...

You cannot do this either. You cannot access programs (or any files for that
matter) on the local file system. You simply do not know where they are. For
example on one of platforms on one of my computers notepad lives at
e:\win2000b\notepad.exe. On the same computer there are notepads at
c:\win95chit\notepad.exe, c:\win95chis/notepad.exe and c:\win98\notepad.exe.
i can call them with file:///C:/WINDOWS/NOTEPAD.EXE but if i am to run
this on a number of windows platforms (eg: nt and win2000 would need to call
it via file:///C:/WINNT/NOTEPAD.EXE ) it won't work.

See above. WINDOWS and WINNT are only the defaults.
now i figure if i use something along the lines of:
file:///%systemroot%/NOTEPAD.EXE (although this does not work for me), the
link would work for any windows revision.

This is never going to work with a browser. I assume you obtained this by
looking at .INF files. Well, the windows installer (the bloke that processes
INF files) knows about this. The browser does not.
any ideas?

On most default systems you can open notepad by linking to a file like
file.txt - oops, no you can't, the browser will display it for you. Excell
*may* open if you link to spreadsheet.xls. Paint *may* open if you link to
picture.bmp (not on my system though). However this is totally beyond your
control so this is a dead end.

You *could* construct your own browser. This is actually very easy. C# is
the language to use, it comes with a built in browser control, all you have
to do is supply the chrome and you get to take action when a link is
activated. You could then use the standard Windows API functions to find
where notepad lives. You would have to abandon the visual bit and delve down
to the underlying C++. GetWindowsDirectory is the API function to use. Hmmm,
how do you find out where Word lives? Answer: you dont. Well, you actually
can if you wish to walk the registry looking for file associations that
point to word.exe (or whatever it's called) :)

Have you thought of using CHM files, you know, compiled html help, the ones
that windows use for all its help. The html help viewer (HH.EXE of course)
*can* run programs and *does* know about things like %systemroot%. Remember
last time you were searching around windows help and came across an icon
that said "show me"? Click on it and it opens control panel or network
diagnostics or whatever? The HTML help workshop may be downloaded from, of
course, microsoft.com. Once again though where does Word live?

We do, however, digress away from HTML :)

Cheers
Richard.
 
B

bob

thanks for your help richard,
every system i've used %systemroot% in the address has taken me to
the system files (one of my systems is a quad boot with ME, 2000, 2000serv
and XPpro on it and whilst in each os, this address works. (only tried
Internet explorer and explorer) despite the varying drive assignment. but
as a hyperlink... no go... i've just about given up on it.

the help files idea is food for thought, i've been compiling the html
into an exe, so maybe i should poke around in that direction

thanks again
bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top