My last question wound up opening up a larger can of worms then I had
thought. This may be off-topic as it involves more then just C++. Any help
would be appreciated.
Our application is as follows:
99% of the application is an intranet web site
1% is a group of EXEs on the user's machine to do the things that the
intranet cannot/does not allow. For example, writing files, creating
directories etc etc.
The EXEs would be called directly when the intranet needed something
specific done, for example:
c:\intranet\commands\copyFile.exe http:\\www.intranet.com\file.pdf
copyFile.exe is a simple (mythical) program that downloads a file off the
intranet and stores it locally on the user's machine.
This command would then (presumably) be called by the intranet using html.
(I forget if they strip html)
[a href="c:\intranet\commands\copyFile.exe
http:\\www.intranet.com\file.pdf"]download this file[/a]
This did not work. The latest security changes for IE prevent you from
simply creating a direct link to the file.
I experimented with creating a HTA file, but the exe reference variable
(http:\\www.intranet.com\file.pdf) did not appear to go through
So I experimented with using a vbscript command
sub onclick_method()
Set WshShell = CreateObject("WScript.Shell")
cmd = "c:\intranet\commands\copyFile.exe http:\\www.intranet.com\file.pdf"
Set oExec = WshShell.Exec(cmd)
end sub
This, simply, threw an error. I know the term "threw an error" is useless,
to make a long story short, the application I am working on is quite
involved, and it runs just fine by itself, but when it is executed via
(WScript.Shell) there must be a permission style problem because somewhere,
somehow the (normally working exe) simply bombs on execution (blank error
message, and it crashes). So I've put off trying to force it to work with
WshShell simply because I don't know how much work that will be.
The other problem with an HTA is it prompts the user twice: 1st time to make
sure they want to load the HTA, and one time to make sure they want to load
the EXE the HTA is trying to call.
Does anyone have any suggestions on a better method of communicating with a
local C++ EXE and the web server? The web server needs to initiate the call
to the EXE (it can't be the other way around) because the web server is the
one requesting commands (create this directory, download this file, upload
this information).
Any help is appreciated.