Executable de lancement

Bonjour,

J'aimerai créer un executable en vb qui me permette de lancer automatiquement des fichiers.un peu comme si j'utilisais les taches planifieés...
Je ne connais pas les commandes et je ne trouve pas sur le net...
merci.
Amandine.

4 réponses

  1. Contributeur
    jai trouvé ca sur le net:
    Private Sub Command1_Click()
    'Ouvre Fichier.exe
    Shell App.Path & "/Fichier.exe"
    End Sub
    


    si tu veux sinon je sais comment le faire en VBS si sa t'interresse?
    1. Contributeur
      ya ca mais c est du VB.NET donc je sais pas si c est compatible..

      Public Sub ShellandWait(ByVal ProcessPath As String)
              Dim objProcess As System.Diagnostics.Process
              Try
                  objProcess = New System.Diagnostics.Process()
                  objProcess.StartInfo.FileName = ProcessPath
                  objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
                  objProcess.Start()
      
                  'Wait until the process passes back an exit code 
                  objProcess.WaitForExit()
      
                  'Free resources associated with this process
                  objProcess.Close()
              Catch
                  MessageBox.Show("Could not start process " & ProcessPath, "Error")
              End Try
          End Sub


      La dictature c'est : "ferme ta geule !"
      La democratie c'est : "cause toujours !"