Private Sub Command1_Click()
Dim sCommand as String
Dim oWrite as System.IO.StreamWriter
sCommand = "cmd C:\Windows\System32\java.exe -version2> C:\Users\Desktop\version.txt"
oWrite = IO.File.CreateText(C:\Users\Desktop\version.txt
End Sub
When i run the command in the command prompt it does what it is suppose to do (write to txt file. But when implemented into VB it will run and flash the command prompt but it will not write to a file.
Am I missing a line of something?