Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
Problems executing external application (.exe) using Windows service
gaurav tyagi
Jun 19 2006 7:48 AM
3.6k
Reply
hi
i am gaurav from bangalore
i have one problem ,can u please help me out.
i have one windows application and one windows service.
from windows application i have to call one process "gpg" to encrypt my text file so i use
system.
Diagnostics.process class to make new process.
my code is like this
Process
processEncryption =
new
Process
();
processEncryption.StartInfo.WorkingDirectory =
@"c:\Gnu\GNUPg"
;
processEncryption.StartInfo.FileName =
"gpg"
;
processEncryption.StartInfo.Arguments =
@" -o "
+
"\""
+ path + fileName +
"\""
+
" --passphrase "
+ passphrase +
" -d "
+
"\""
+ path + fileName +
".gpg"
+
"\""
;
processEncryption.Start();
processEncryption.WaitForExit();
this code work fine if i use this code in windows application
but it does not work at all in windows service .
code runs comepletely but does not produce any output "
it seems that this code is not able to start process "gpg" if we run in windows service.
can u help me
thanx in advance
bye
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to access System properties
Loking for C# practice Problems