|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
shell command in windows service doesn't executeI am using a windows service to extract every hour a log from our mailserver in order to parse the logfile. To do this I used the folowing code: Shell("""C:\pscp"" -pw ******* mgm@192.168.1.240:/var/log/qmail/current C:\_var_log_qmail_current.txt", AppWinStyle.MaximizedFocus) I know the """ isn't needed but i added them for testing reasons. So what happens: nothing. The shell command doesn't get executed. I did some help lookup and tried to test with the windows example: Shell("C:\WINNT\system32\calc.exe", AppWinStyle.NormalFocus) And even this one doest work. I try-catched it and debugged with the service debugger, but there are no errors on that line. Anyone knows what the problem could be? I have this import: Imports Microsoft.VisualBasic Tnx a lot ! What happens when you do this and put a break point on the catch?
Try Shell("C:\WINNT\system32\calc.exe", AppWinStyle.NormalFocus) Catch ex As Exception End Try Show quoteHide quote "BROQ" <christophe.br***@gmail.com> wrote in message news:295da4e5.0504150130.76fd5e9f@posting.google.com... > Hi, > > I am using a windows service to extract every hour a log from our > mailserver in order to parse the logfile. > To do this I used the folowing code: > > Shell("""C:\pscp"" -pw ******* > mgm@192.168.1.240:/var/log/qmail/current > C:\_var_log_qmail_current.txt", AppWinStyle.MaximizedFocus) > > I know the """ isn't needed but i added them for testing reasons. > So what happens: nothing. The shell command doesn't get executed. > I did some help lookup and tried to test with the windows example: > > Shell("C:\WINNT\system32\calc.exe", AppWinStyle.NormalFocus) > > And even this one doest work. > I try-catched it and debugged with the service debugger, but there are > no errors on that line. > Anyone knows what the problem could be? > > I have this import: Imports Microsoft.VisualBasic > > Tnx a lot !
Paging by example - help - still no luck....
Get processes list problem (win 2000) Reading an XML file into a Dataset - problem Collection Type BindingManagerBase Problem Hide members in a derived class Good book about VB.NET ? Response.Redirect("WebForm1.aspx") Sharing references/members VB.net Ablauf vom packen eines Projekts |
|||||||||||||||||||||||