I am attempting to open a cmd.exe process with the 8 arguments listed
At this point all this does is open a command window in the correct directory
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
F:\Python26>
What I want to send to the command window is:
F:\Python26> python.exe globalmaptiles_modified.py 17 32.123365 -95.938098 32.266846 -95.789143 F:\Python26\process_test.txt
And have it execute and create the desired file
Imports System.Net
Imports System.Diagnostics
Public Class Form1
Private Sub btnCallPythonScript_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnCallPythonScript.Click
Dim myProcess As System.Diagnostics.Process = New System.Diagnostics.Process()
myProcess.StartInfo.FileName = "F:\Windows\System32\cmd.exe"
myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
myProcess.StartInfo.WorkingDirectory = "F:\Python26\"
myProcess.StartInfo.Arguments = "python.exe globalmaptiles_modified.py 17 32.123365 -95.938098 32.266846 -95.789143 F:\\Python26\\process_test.txt"
myProcess.Start()
End Sub
End Class
I have even tried this with a design Process from the toolbar and set the File, working directory and start info arguments and I get the exact same results. I am not understanding the Argments function or I am doing something wrong and not sending them correctly.
At this point all this does is open a command window in the correct directory
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
F:\Python26>
What I want to send to the command window is:
F:\Python26> python.exe globalmaptiles_modified.py 17 32.123365 -95.938098 32.266846 -95.789143 F:\Python26\process_test.txt
And have it execute and create the desired file
Imports System.Net
Imports System.Diagnostics
Public Class Form1
Private Sub btnCallPythonScript_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnCallPythonScript.Click
Dim myProcess As System.Diagnostics.Process = New System.Diagnostics.Process()
myProcess.StartInfo.FileName = "F:\Windows\System32\cmd.exe"
myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
myProcess.StartInfo.WorkingDirectory = "F:\Python26\"
myProcess.StartInfo.Arguments = "python.exe globalmaptiles_modified.py 17 32.123365 -95.938098 32.266846 -95.789143 F:\\Python26\\process_test.txt"
myProcess.Start()
End Sub
End Class
I have even tried this with a design Process from the toolbar and set the File, working directory and start info arguments and I get the exact same results. I am not understanding the Argments function or I am doing something wrong and not sending them correctly.