L
Leonid L
[This may sound like a programming question, but it is actually
simpler than that.]
I have a Windows Server 2003 SP1 configured to run nightly tests of
software. That involves: A) Downloading them using tf.exe, B)
compiling them using devenv.exe, C) running an executable created
during compilation.
I've written a small C# App that performs steps 1) 2), and 3) in
order. I also created a local non-admin user, and configured the task
scheduler to run this App as that user (I supplied a password).
The App started in this way fails at step 2) The exact message is:
"Error spawning 'C:\Windows\System32\cmd.exe'"
Without getting into details of the build process, I need to tell you
that I do not have this same problem when I start the app myself (when
logged in to the computer over remote desktop). I think the
environment variables differ depending on how I log in to computer.
When I am actually logged in, I can capture the values of the
environment variables by running a .bat script, containing the
following line:
set > C:\<mypath>\set_out.txt
However, I could not get the same script to run successfully when I
schedule it to run and I myself am not logged in. I am specifying the
full output path, it exists, and permissions look OK. It must be
getting confused about the first part - the set command. I do not
think it is able to find it.
=========================================================================
Any suggestions on how I can capture the environment reliably when I
am not logged in ?
simpler than that.]
I have a Windows Server 2003 SP1 configured to run nightly tests of
software. That involves: A) Downloading them using tf.exe, B)
compiling them using devenv.exe, C) running an executable created
during compilation.
I've written a small C# App that performs steps 1) 2), and 3) in
order. I also created a local non-admin user, and configured the task
scheduler to run this App as that user (I supplied a password).
The App started in this way fails at step 2) The exact message is:
"Error spawning 'C:\Windows\System32\cmd.exe'"
Without getting into details of the build process, I need to tell you
that I do not have this same problem when I start the app myself (when
logged in to the computer over remote desktop). I think the
environment variables differ depending on how I log in to computer.
When I am actually logged in, I can capture the values of the
environment variables by running a .bat script, containing the
following line:
set > C:\<mypath>\set_out.txt
However, I could not get the same script to run successfully when I
schedule it to run and I myself am not logged in. I am specifying the
full output path, it exists, and permissions look OK. It must be
getting confused about the first part - the set command. I do not
think it is able to find it.
=========================================================================
Any suggestions on how I can capture the environment reliably when I
am not logged in ?