Dave,
I am assuming that you mean the startup for your exe is slow, and not
the exe itself. What you are doing seems correct. What kind of numbers are
you seeing? Also, since this is in an ASP.NET application, what kind of
load are you seeing on the server? This could be an issue.
I am confused though. You ask how you can make an exe launched server
side from an ASPX file run faster. Then you comment on how when you run it
on the client side it is much faster. Most of the time, the client and the
server are two separate machines, so you are going to see radical changes in
the way it is executed. You can't trigger a process to execute on the
client from the server side, you can only write code that when interpreted
in the browser will execute the executable.
I think that what you are trying to do is get a process to run on the
client side. You will have to use javascript injected into your page to do
this. Also, chances are you will not be able to get it to run, given the
security settings of the machine (imagine if any web page could run any
executable on the client machine that they want. Not good).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"dave" <an*******@discussions.microsoft.com> wrote in message
news:36****************************@phx.gbl...
Hi,
Does anyone know how I could make an .exe launched server
side from an aspx file run faster? When I use javascript
client side it of couse is much faster. Here's my code
This code does work but it's extremely slow. What am I
missing?
Process Updater = new Process();
Updater.StartInfo.FileName = "C:\\Program
Files\\someprogram.exe";
Updater.StartInfo.Arguments = "-somearguments";
Updater.StartInfo.UseShellExecute = true;
Updater.StartInfo.CreateNoWindow = false;
Updater.StartInfo.WindowStyle =
ProcessWindowStyle.Maximized;
Updater.Start();
Updater.WaitForExit();
//Response.Write("<script>var oShell = new ActiveXObject
(\"Shell.Application\"); var commandtoRun =
\"c:\\\\Program Files\\\\someprogram.exe\"; var
commandParms = \"-somearguments";oShell.ShellExecute
(commandtoRun, commandParms,\"\", \"open\", \"1
\");</script>");
//Response.Write("<script>window.close();</script>");