Problem With Runas.exe

  • Thread starter Thread starter Ruchir
  • Start date Start date
R

Ruchir

Hi
I am running an Application which needs to logon to exchange Server,
Since Whenever Code to connect to Exchange Server is called Program
shows me outlook client login Screen on which I need to logon (Exchange
Server is on different netowork).

To avoid this problem I thought of using RunAs.exe but now I Ran into
another problem, My application has some log files in which it writes
log information but now after starting the application using RunAs.exe
(The domain name, username and password information which I am giving
to Runas is the same using which I need to logon to Exchange Server) No
log is being written to the log files...

I am not sure what is happening, when I am not using RunAs.exe,
everything is working fine except that I am asked to logon to exchange
Server, but when I am using RunAs.exe I am not being asked for logging
on to Exchange Server but No log is being written so I am unable to
know if my Application is working correctly or not.

Please Help me
TIA.
Ruchir.
 
Ruchir said:
Hi
I am running an Application which needs to logon to exchange Server,
Since Whenever Code to connect to Exchange Server is called Program
shows me outlook client login Screen on which I need to logon (Exchange
Server is on different netowork).

To avoid this problem I thought of using RunAs.exe but now I Ran into
another problem, My application has some log files in which it writes
log information but now after starting the application using RunAs.exe
(The domain name, username and password information which I am giving
to Runas is the same using which I need to logon to Exchange Server) No
log is being written to the log files...

I am not sure what is happening, when I am not using RunAs.exe,
everything is working fine except that I am asked to logon to exchange
Server, but when I am using RunAs.exe I am not being asked for logging
on to Exchange Server but No log is being written so I am unable to
know if my Application is working correctly or not.

Hard to say without seeing any of your actual code, but I suspect that the
account whose credentials you are using lacks the access to write the log
files.

/Al
 
Al Dunbar said:
Hard to say without seeing any of your actual code, but I suspect
that the
account whose credentials you are using lacks the access to write
the log
files.

Another possibility: if you are using default locations or environment
variables in the path to your log file, the logs may be saved in a
location you may not expect. For instance, if you use (runas
/u:%computername%\administrator app.exe) and if you're saving
"%userprofile%\app.log" under the user account "ruchir", you may be
looking for "C:\Documents and Settings\ruchir\app.log", where the real
log file is "C:\Documents and Settings\Administrator\app.log". I make
this kind of mistake all the time.

If this is the problem, either fix your file name and path, or use the
/env argument with runas.exe.

David
Stardate 6157.6
 
Back
Top