B
Bill Rapoza
We have a method that executes an arbitrary batch file (we use it for remote
upgrades of our system).
When we execute this method from outside of ASP.NET (either in the
foreground app or from a windows service), the method works fine. However,
when we execute it from ASP.NET, the execution fails on some machines. Now,
if instead of running the batch file directly, I run cmd.exe and have it run
the batch file:
cmd /k platformupgrade.bat
the batch file still does not execute (note: I'm using /k instead of /c for
debugging purposes. the behavior is identical).
However, if I run cmd and have it also run cmd and have the second cmd run
the batch file:
cmd /k cmd /c platformupgrade.bat
The batch file runs fine.
What's going on here? Frankly, I'm very leery of including this "fix" into
my application because it's so strange.
upgrades of our system).
When we execute this method from outside of ASP.NET (either in the
foreground app or from a windows service), the method works fine. However,
when we execute it from ASP.NET, the execution fails on some machines. Now,
if instead of running the batch file directly, I run cmd.exe and have it run
the batch file:
cmd /k platformupgrade.bat
the batch file still does not execute (note: I'm using /k instead of /c for
debugging purposes. the behavior is identical).
However, if I run cmd and have it also run cmd and have the second cmd run
the batch file:
cmd /k cmd /c platformupgrade.bat
The batch file runs fine.
What's going on here? Frankly, I'm very leery of including this "fix" into
my application because it's so strange.