Imports System.Text

Module Module1

    Sub Main()
        Dim args() As String = System.Environment.GetCommandLineArgs()
        Dim sb As New StringBuilder
        For Each arg As String In args
            Console.WriteLine(arg)
            sb.AppendLine(arg)
        Next
        Dim s As String = sb.ToString
        Dim filepath As String = "passinvar.txt"
        If Not System.IO.File.Exists(filepath) Then
            System.IO.File.Create(filepath).Dispose()
        Else
            My.Computer.FileSystem.DeleteFile(filepath)
        End If
        Dim file As System.IO.StreamWriter
        file = My.Computer.FileSystem.OpenTextFileWriter(filepath, True)
        file.WriteLine(s)
        file.Close()
        Console.ReadKey()
    End Sub

End Module
