1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
Imports System
Imports System.Threading
Public Class etape2
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Shared Sub ThreadProc()
'lancement de l'exe mon.exe en silencieux
Dim monprog As String = "C:\mon.exe /U /Q"
Microsoft.VisualBasic.Interaction.Shell(monprog, , True)
Thread.Sleep(30000)
End Sub
Private Sub etape2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Pour supprimer SMS
If KILL_SMS Then
Me.GRB_NOM_TACHE.Text = "Désinstallation de SMS"
'création d'un Thread (nouveau processus) pour lancer l'exe
Me.LBL_DESCRIPTION.Text = "désinstallation de SMS en cours ..."
Dim t As New Thread(AddressOf ThreadProc)
t.IsBackground = True
t.Start()
Me.LBL_DESCRIPTION.Text = "Fin de tempo"
End If
If KILL_EPO Then
Me.GRB_NOM_TACHE.Text = "Désinstallation de EPO"
End If
End Sub
Private Sub BT_RETURN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_RETURN.Click
Me.Hide()
index.Show()
End Sub
End Class |
Partager