- Private Sub Command1_Click()
- Shell "AT 13:15 /INTERACTIVE /EVERY:l,ma,me,j,v,s,d """ & App.Path & "\" & App.EXEName & ".exe"" auto"
- MsgBox "Une tâche sous le nom de AT1 a été crée"
- End Sub
-
- Private Sub Command2_Click()
- Dim Login As String, MotPasse As String
- Login = InputBox("Entrez votre nom d'utilisateur. " & vbCrLf & "(Le nom aevc lequel vous ouvrez votre session Windows)", "Authentification.")
- If Len(Login) = 0 Then Exit Sub
- MotPasse = InputBox("Entrez votre mot de passe Windows :", "Authentification.")
- If Len(MotPasse) = 0 Then Exit Sub
-
- Dim Schedule As Object, J As Object
- Set Schedule = CreateObject("TaskScheduler.Schedule")
- On Error GoTo Sortie
- Set J = Schedule.CreateTask("UsineAGaz")
- J.ApplicationName = App.Path & "\" & App.EXEName & ".exe"
- J.Creator = "Moi ou quiconque"
- 'J.Triggers.Add.TriggerType = ttDaily
- 'J.Triggers.Add.BeginDay = Now
- J.Triggers.Add.StartTime = CDate("13:15:00")
- 'J.Flags = tfDisabled
- J.CommandLine = "auto"
- Ret = J.SetAccountInfo(Login, MotPasse)
- J.Save
- 'J.ShowProperties
- MsgBox "La sauvegarde automatique a été planifiée pour une execution quotidienne à 13h15."
- Exit Sub
- Sortie:
- Call MsgBox("UsineAGaz semble être déjà planifié. Si vous souhaitez le planifier de nouveau supprimez celui-ci d'abord dans le gestionnaire des tâches planifiées :" & vbCrLf & vbCrLf & "-->Panneau de configuration\Tâches planifiées", vbCritical)
-
- End Sub
-
Private Sub Command1_Click()
Shell "AT 13:15 /INTERACTIVE /EVERY:l,ma,me,j,v,s,d """ & App.Path & "\" & App.EXEName & ".exe"" auto"
MsgBox "Une tâche sous le nom de AT1 a été crée"
End Sub
Private Sub Command2_Click()
Dim Login As String, MotPasse As String
Login = InputBox("Entrez votre nom d'utilisateur. " & vbCrLf & "(Le nom aevc lequel vous ouvrez votre session Windows)", "Authentification.")
If Len(Login) = 0 Then Exit Sub
MotPasse = InputBox("Entrez votre mot de passe Windows :", "Authentification.")
If Len(MotPasse) = 0 Then Exit Sub
Dim Schedule As Object, J As Object
Set Schedule = CreateObject("TaskScheduler.Schedule")
On Error GoTo Sortie
Set J = Schedule.CreateTask("UsineAGaz")
J.ApplicationName = App.Path & "\" & App.EXEName & ".exe"
J.Creator = "Moi ou quiconque"
'J.Triggers.Add.TriggerType = ttDaily
'J.Triggers.Add.BeginDay = Now
J.Triggers.Add.StartTime = CDate("13:15:00")
'J.Flags = tfDisabled
J.CommandLine = "auto"
Ret = J.SetAccountInfo(Login, MotPasse)
J.Save
'J.ShowProperties
MsgBox "La sauvegarde automatique a été planifiée pour une execution quotidienne à 13h15."
Exit Sub
Sortie:
Call MsgBox("UsineAGaz semble être déjà planifié. Si vous souhaitez le planifier de nouveau supprimez celui-ci d'abord dans le gestionnaire des tâches planifiées :" & vbCrLf & vbCrLf & "-->Panneau de configuration\Tâches planifiées", vbCritical)
End Sub