471,306 Members | 902 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

Launching a cygwin utility from within a Windows Service

Ok, I'm trying to write a basic scp scheduler, which will occasionally
scan a directory, and use cygwin's scp.exe to copy the files to a Unix
box. After various problems, the set up I've got now is this:

A Console application, which accepts the file as a parameter, and
launches the scp utility via the Process.Start() command. If I call
this Console from a command line, or from a dos-prompt, the file
transfers correctly, without need of input from me, as the id_dsa keys
are set up correctly.

If I call the same console application from a Windows Service, even
though the parameters get passed through correctly, the process never
gets past the Process.WaitForExit() statement. It does launch the scp
utility, however, as it shows up in Task Managers process list. The
Windows Service is set up to run under my domain account, the same I
use to log in every day.

Does the Windows Service not have the same environment variables I have
set up? Why should it not run correctly when called from a Windows
service, if it runs when called from the command line?

Jul 21 '05 #1
0 1220

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Michael | last post: by
reply views Thread by nick | last post: by
4 posts views Thread by reachsamdurai | last post: by
1 post views Thread by Water Cooler v2 | last post: by
5 posts views Thread by mgierdal | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.