Pages

Wednesday, February 2, 2011

Command Line Arguments

Set Application Type to Console Application


'[CONS withspyware] TopXPrepare.exe - cons -spy
        Try
            '----Parsing the Commandline to tag if BETA of CONS
            Dim args() As String = System.Environment.GetCommandLineArgs()

            For i As Integer = 0 To args.Length - 1
                If i = 1 Then
                    If args(i) = "-beta"
                        Parameter = "BETA"

                        If args(i + 1) = "-spy"
                            SParameter = "SPY"
                           
                        ElseIf args(i + 1) = "-nospy"
                            SParameter = "NOSPY"
                           
                        End If

                    ElseIf args(i) = "-cons"
                        Parameter = "CONS"

                        If args(i + 1) = "-spy"
                            SParameter = "SPY"
                           
                        ElseIf args(i + 1) = "-nospy"
                            SParameter = "NOSPY"
                          
                        End If
                    
                    Else
               
                    End If
                End If
            Next

            Console.ReadKey()
    
        Catch ex As Exception
           
        End Try

No comments:

Post a Comment