2 Replies Latest reply on Jan 4, 2006 9:34 AM by enrico montariolo

    how NSH executes an exe program ?

      Politecnico di Milano has an .exe program that has been internally developed and that it's used to check that a specific process is running (and if not to restart it).

      If this program is launched by double-click or by windows command line the program executes regularly but if i use NSH to launch the program (using nexec -e program_name) it fails to execute (or better fails to start) with a "Runtime error: Program abnormal termination" error message (is the Visual C++ toolkit that pops up the message error).

      I suspect there are some differences between the way windows shell launches an .exe and the way NSH launches it.

      If somebody knows the details about these differences and give me some lights on them, it will be very appreciated (and maybe it will help in solving this roadblock problem).




        • 1. Re: how NSH executes an exe program ?

          There's no real difference between how NSH/Agent executes things versus

          double-clicking on them.


          There is a difference in the environment though. When you double-click on the executable, you must have logged in so your executing it using the environment

          of your logged on user.


          When you nexec the executable through the agent, the program will be launched

          using the environment associated with the agent (which could be drastically

          different then the logged on users' environment). Even though the agent

          is impersonating a particular user (Administrator or whatever), the environment

          is still the agent's environment.

          • 2. Re: how NSH executes an exe program ?

            During yesterday tests we detected these differences in environment variables so before nexecing the .exe we have set the environment variables just the same as those of administrator (the user we used to launch the .exe from windows command line) but the problem didn't disapper.