I've had a bug in my app that has been a pain to figure. When I compile on my local machine and run there it works fine. When I run on other boxes, it craps out when reading the args. The same thing happened when using both System and My methods for getting command line args.

Any suggestions?

VB Code:
  1. Sub main()
  2.         Dim cmdline As String = ""
  3.         'Dim Args() As String = System.Environment.GetCommandLineArgs()
  4. [B]        For Each Arg As String In My.Application.CommandLineArgs 'Args[/B]
  5.             MsgBox(Arg)
  6.             If InStr(LCase(Arg), APP_NAME) = 0 And InStr(LCase(Arg), DEBUG_APP_NAME) = 0 Then
  7.                 cmdline += Arg & " "
  8.             End If
  9.         Next