views:

44

answers:

1

I have a program which i want to invoke from windows service.

xsftp.StartInfo = New ProcessStartInfo("c:\stage\psftp.exe", "[email protected] -b c:\stage\script.bat -pw XXX")
xsftp.Start()

The same code works fine if i write in a console application, but from windows service it wont run, i see the psftp is being started in the task manager but it wont do anything..

any ideas ? Thanks! Srin

A: 

How do you determine it doesn't do anything? If you're looking for GUI, it might be running under a different user, without access to your desktop.

Sphynx
the script.bat has a ftp commands to put the file to server. I dont see any file on the server. and the last command is 'bye' so technically it should have exited after execution. -- this is what it happens when i run the same code from console app.
Sr7