Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.97 KB | None | 0 0
  1. Me.Visible = False
  2.         Me.ShowInTaskbar = False
  3.         Process.Start(path)
  4.         If Not Directory.Exists("C:\log") Then
  5.             Directory.CreateDirectory("C:\log")
  6.         End If
  7.  
  8.         If Not Directory.Exists("C:\logg" + Date.Now.ToString("dd-MM-yyyy")) Then
  9.             Directory.CreateDirectory("C:\logg" + Date.Now.ToString("dd-MM-yyyy"))
  10.         End If
  11.  
  12.         Dim fs As New FileStream("C:\log\" + Date.Now.ToString("Le dd-MM-yyyy à hh-mm-ss") + ".txt", FileMode.Create, FileAccess.Write)
  13.         Dim s As New StreamWriter(fs)
  14.         s.BaseStream.Seek(0, SeekOrigin.End)
  15.         s.WriteLine("Process :" + path)
  16.         s.WriteLine("Computer Name :" + Environment.MachineName.ToString)
  17.         s.WriteLine("User Name :" + Environment.UserName.ToString)
  18.         s.WriteLine("Uptime : " + Mid((Environment.TickCount / 60000), 1, 5) & " Minutes" + vbCrLf)
  19.         s.WriteLine("Date & Time :" + DateAndTime.Now.ToString)
  20.         s.Close()
  21.         Me.Close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement