TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
gaurav tyagi
NA
1
0
Problems executing external application (.exe) using Windows service
Jun 19 2006 7:48 AM
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
Reply
Answers (
1
)
How to access System properties
Loking for C# practice Problems