Hello Cubaman
I was thinking so far ahead I should have phrased the question differently
because I knew that a Windows application could be executed from a dos batch
file program because I saw it and since I used to write dos file batch
programs I knew how to create a batch file program already. So I went ahead
and created the batch program and it does work.
However:
When using ClickOnce it creates/deploys the Windows application (.exe)from
the local hard drive onto the server in a folder named Inetpub\wwwroot. The
file ClickOnce creates to install the Windows application from there ontothe
client from there is named Publish.htm . Publish.htm then puts the
application in the users Start menu.
That means there is no Windows application.exe file created by ClickOnce for
the batch file to execute on the server.
So the batch file has to execute the actual Windows application (.exe) from
my ocal hard drive that it was created on which is what the user sees and
uses. That is how I created the batch file to work and it does work.
So the question actually is will the application that the user sees that
comes from
my local hard drive that I provide access to them work the exact same wayas
the
application that gets deployed to them onto their local hard drive by
ClickOnce?
The reason that is the question is because the Windows application got
executed
from a Hyperlink control which states “runat=server, which means things in
the
Windows application like Messagebox.show may not work because Windows
applications run on the client not the server.
My thought is that when the batch program runs it is executing the Windows
application from my local hard drive and is therefore running from the hard
drive and not the server and was only rendered to the user using the
Hyperlink. Therefore since it executing off of my local hard drive those
features like Messagebox.show should work because they are not running onthe
server. However I don’t know if multiple users are getting their own instance
of the application or is only one user able to use the application at a time.
Of course the Windows application (.exe) file will eventually be moved toa
server because my box isn’t on all of time.
What do you think?
Below is the dos batch file and below that is how the Hyperlink on the web
page executes the batch file:
***Batch file
rodTest.bat
cd c:\Products\bin\Release
c:\ Products\bin\Release \frmProducts.exe"
*** the call to the batch file from web page using Hyperlink
protected void lnkProducts_Click(object sender, EventArgse)
{
ProcessStartInfo prodRun = new
ProcessStartInfo("C:\\Products\\prodTest.bat");
Process exProducts = new Process();
prodRun.UseShellExecute = true;
prodRun.WorkingDirectory = "C:\\Products\\";
exProducts = Process.Start(prodRun);
}
Thanks
Jeff