' tempdir.vb Imports System Imports System.IO Public Class TempDir Shared Sub Main() Dim name As String = Path.GetTempPath() Console.WriteLine(name) ' 出力例: ' C:\DOCUME~1\taka-e\LOCALS~1\Temp\ End Sub End Class ' コンパイル方法:vbc tempdir.vb