Advertisement
Guest User

Untitled

a guest
Dec 26th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. Private Sub FlatButton6_Click(sender As Object, e As EventArgs) Handles FlatButton6.Click
  2. If My.Computer.FileSystem.DirectoryExists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "LauncherArma") Then
  3. My.Computer.FileSystem.DeleteDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "LauncherArma", FileIO.DeleteDirectoryOption.DeleteAllContents)
  4. End If
  5.  
  6.  
  7. If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "LauncherArmamodsname.txt") Then
  8. My.Computer.FileSystem.DeleteFile(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "LauncherArmamodsname.txt")
  9. End If
  10.  
  11. My.Computer.FileSystem.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "LauncherArma")
  12. UnRar(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "Addon.rar", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "LauncherArma")
  13. Dim ligne As String
  14. My.Computer.Network.DownloadFile("FTP ADDRESS. Hidden for security. Don't worry, the download files works!/modsname.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "LauncherArmamodsname.txt")
  15. Dim sr As New StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "LauncherArmamodsname.txt")
  16. While sr.Peek <> -1
  17. ligne = sr.ReadLine()
  18. My.Computer.FileSystem.CopyDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "LauncherArma" & ligne, directory & "" & ligne, True)
  19. End While
  20. PictureBox1.Visible = True
  21. FlatButton6.Visible = False
  22. FlatProgressBar1.Visible = False
  23. FlatLabel1.Visible = False
  24. FlatLabel2.Visible = False
  25. FlatLabel3.Visible = False
  26. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement