It just does nothing
I've been looking around for some other solution and this works fine:
Dim foo As New System.Diagnostics.Process
foo.StartInfo.WorkingDirectory = "c:\"
foo.StartInfo.RedirectStandardOutput = True
foo.StartInfo.FileName = "pscp.exe"
foo.StartInfo.Arguments = "-pw ****
mg*@192.168.1.57:/var/log/qmail/current C:\_var_log_qmail_current.txt"
foo.StartInfo.UseShellExecute = False
foo.StartInfo.CreateNoWindow = True
foo.Start()
foo.WaitForExit()
foo.Dispose()
That works fine. I left the shell command behind me now.
"JohnFol" <Ou************@WibbleObbble.Com> wrote in message news:<hc*****************@newsfe2-gui.ntli.net>...
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
"BROQ" <ch**************@gmail.com> wrote in message
news:29**************************@posting.google.c om... 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 *******
mg*@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 !