razovy

razovy

  • NA
  • 7
  • 0

Windows Service runs batch file on Windows Server 2003

Aug 15 2005 4:01 PM

I developed Win Service for creation and running batch file (.NET - VS 2003).

Than batch file runs Putty’s family utility pscp.exe for remote file copy (Linux -> Windows)

 

Everything is working fine on XP machine, but not on WS2003 (Windows Server 2003).

 

Task Manager shows running cmd.exe and pscp.exe processes, but no files are copied.

 

 

 

Prerequisites:

-         Logon as Administrator

-         Cmd.exe has all permissions

-         Windows Service is running under Administrator account, and I even used Impersonation for this service

-         I tried to run this Service under various accounts too giving all possible permissions.

-         Windows Service was tested with and without “Allow service to interact with desktop” option

-         I run it under “Local System account” and Network as well.

 

 

 

Standalone batch file runs perfect on WS2003 – no problems, everything is copied as expected.

No problems when this batch file is started from Windows Application.

 

 

No Error events in any of three Event Log files.

 

Strangely “Allow service to interact with desktop” option does not show “Command Line Window“ although cmd.exe is running as a hidden window!!!

 

 

Do you have any idea, gurus?