EDN Admin
Well-known member
I am trying to run this tftp command from VB.net clickonce application
tftp -i 192.168.10.177 put test1.bin
i can run from a command prompt, from the release directory of vb and from the clickonce app directory without issue
however when i try my vb application i get a file not found.
i also noticed that if i run a command prompt from within the vb app i cannot find the tftp executable either but it is their when i look through a normal cmd prompt
run window 7 pro 64bit
here is code
<pre class="prettyprint lang-vb Dim oProcess As New Process
If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then
Console.WriteLine(ApplicationDeployment.CurrentDeployment.DataDirectory)
End If
Console.WriteLine(System.AppDomain.CurrentDomain.BaseDirectory)
Dim base As String = System.AppDomain.CurrentDomain.BaseDirectory
oProcess.StartInfo.UseShellExecute = False
oProcess.StartInfo.FileName = "c:windowssystem32tftp.exe"
oProcess.StartInfo.Arguments = "-i 192.168.10.177 put test1.bin"
oProcess.StartInfo.RedirectStandardOutput = True
oProcess.StartInfo.WorkingDirectory = base
oProcess.Start()
Dim outp As String = oProcess.StandardOutput.ReadToEnd
oProcess.WaitForExit()
Console.WriteLine(outp)[/code]
<br/>
<pre class="prettyprint <br/>[/code]
View the full article
tftp -i 192.168.10.177 put test1.bin
i can run from a command prompt, from the release directory of vb and from the clickonce app directory without issue
however when i try my vb application i get a file not found.
i also noticed that if i run a command prompt from within the vb app i cannot find the tftp executable either but it is their when i look through a normal cmd prompt
run window 7 pro 64bit
here is code
<pre class="prettyprint lang-vb Dim oProcess As New Process
If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then
Console.WriteLine(ApplicationDeployment.CurrentDeployment.DataDirectory)
End If
Console.WriteLine(System.AppDomain.CurrentDomain.BaseDirectory)
Dim base As String = System.AppDomain.CurrentDomain.BaseDirectory
oProcess.StartInfo.UseShellExecute = False
oProcess.StartInfo.FileName = "c:windowssystem32tftp.exe"
oProcess.StartInfo.Arguments = "-i 192.168.10.177 put test1.bin"
oProcess.StartInfo.RedirectStandardOutput = True
oProcess.StartInfo.WorkingDirectory = base
oProcess.Start()
Dim outp As String = oProcess.StandardOutput.ReadToEnd
oProcess.WaitForExit()
Console.WriteLine(outp)[/code]
<br/>
<pre class="prettyprint <br/>[/code]
View the full article