@dee-u

i have hera a program called dummy.exe and it on runs under ms-dos prompt
i want the result to be save into data.txt

this my the code:

VB Code:
  1. Option Explicit
  2.  
  3. Dim O As Long
  4. Dim CShell As String
  5. Dim CSK As New clsSendKeys
  6.  
  7. 'Form Load
  8. Private Sub Form_Load()
  9. cmdGenerate.Enabled = False
  10. txtSerialNumber.Text = ""
  11. txtDummy.Visible = False
  12. txtExit.Visible = False
  13. CShell = Environ("COMSPEC")
  14. O = Shell(CShell & " > C:\data.txt", vbNormalFocus)
  15. End Sub
  16.  
  17. 'Serial Number
  18. Private Sub txtSerialNumber_Change()
  19. If txtSerialNumber.Enabled = True Then
  20.     cmdGenerate.Enabled = True
  21. End If
  22. If txtSerialNumber.Text = "" Then
  23. cmdGenerate.Enabled = False
  24. End If
  25. End Sub
  26.  
  27. 'Generate
  28. Private Sub cmdGenerate_Click()
  29. CSK.Destination = O
  30. CSK.SendKeys txtDummy.Text + vbCrLf
  31. CSK.SendKeys txtSerialNumber.Text + vbCrLf
  32. End Sub
  33.  
  34. 'About
  35. Private Sub cmdAbout_Click()
  36. Call MsgBox("Saras Boxes (Activation String)" & vbCrLf & "" & vbCrLf & "Program by: monxxx - > NOKMASTERgsm (+639155618198)" & vbCrLf & "" & vbCrLf & "Thanks to: Spreader ;-)" & vbCrLf & "" & vbCrLf & "Greetings to: ed2k_5,HiTek_Promdi,rbtabanao,Kontact and for those i forgot to mention... ;-)" & vbCrLf & "" & vbCrLf & "This Windows Based program can be found on:" & vbCrLf & "" & vbCrLf & "               << [url]www.tapgsm.com.ph[/url] >>  ", vbOKOnly + vbInformation + vbApplicationModal, "About")
  37. End Sub
  38.  
  39. 'Exit
  40. Private Sub cmdExit_Click()
  41. CSK.Destination = O
  42. CSK.SendKeys txtExit.Text + vbCrLf
  43. End
  44. End Sub