Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
707 connectés 

  FORUM HardWare.fr
  Windows & Software
  Win NT/2K/XP

  planifier l arret d'un service ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

planifier l arret d'un service ?

n°1636586
Grumly-
Powered by swiffer
Posté le 09-07-2004 à 16:28:05  profilanswer
 

Comment peut on planifier l arret d'un service sous win2K ?
Et apres lancer un defrag d:
puis relancer ce meme service une fois le defrag terminé


Message édité par Grumly- le 09-07-2004 à 16:28:25
mood
Publicité
Posté le 09-07-2004 à 16:28:05  profilanswer
 

n°1636616
blueteen
Posté le 09-07-2004 à 16:46:54  profilanswer
 

quel service ?
on pourrait trouver si une ligne de commande est dispo (comme pour apache) pour tuer le service (ça te permettrait de mettre ça dans un simple .bat et dans un planificateur)
sinon il faudrait passer par un logiciel plus avancé, qui tuera la tâche directement.

n°1636633
Grumly-
Powered by swiffer
Posté le 09-07-2004 à 16:58:10  profilanswer
 

pour arreter le service j'ai trouvé c net stop service
par contre pour planifier la tache de defrag derriere c plus chiant et je trouve pas vu que defrag.exe existe pas sous 2k.

n°1636695
blueteen
Posté le 09-07-2004 à 17:35:09  profilanswer
 

trouvé sur un forum
 

Code :
  1. ' VBScript source code
  2. '
  3. ' Defrag Windows 2000 Script
  4. '
  5. '
  6. ' Schedule this script to automate defragmenting.
  7. '
  8. '
  9. set WshShell = CreateObject("WScript.Shell" )
  10. 'Launch Defrag from the command line and wait for 2 seconds
  11. WshShell.Run "dfrg.msc"
  12. WScript.Sleep 2000
  13. 'Wait until the application has loaded - Check every second
  14. While WshShell.AppActivate("Disk Defragmenter" ) = FALSE
  15. wscript.sleep 1000
  16. Wend
  17. 'Bring the application to the foreground
  18. WshShell.AppActivate "Disk Defragmenter"
  19. WScript.Sleep 500
  20. 'Send keys to move to top of drive/partition table.
  21. WshShell.SendKeys "{TAB}{HOME}"
  22. WScript.Sleep 501
  23. 'Send an ALT-A key to bring down the defrag menu
  24. WshShell.SendKeys "%A"
  25. WScript.Sleep 502
  26. 'Send a D to start the defrag
  27. WshShell.SendKeys "D"
  28. 'Wait until the defrag is completed - Check for window every 5 seconds
  29. While WshShell.AppActivate("Defragmentation Complete" ) = FALSE
  30. wscript.sleep 5001
  31. Wend
  32. 'Bring the Defragmentation Complete window to the foreground
  33. WshShell.AppActivate "Defragmentation Complete"
  34. WScript.Sleep 503
  35. 'Send a tab key to move the focus from View Report button to the Close Button
  36. WshShell.Sendkeys "{TAB}"
  37. Wscript.Sleep 504
  38. 'Send key to Close the Defragmentation Complete window
  39. WshShell.Sendkeys "{ENTER}"
  40. Wscript.Sleep 505
  41. 'End - Bring the application to the foreground
  42. WshShell.AppActivate "Disk Defragmenter"
  43. WScript.Sleep 700
  44. 'End - Send an ALT-F4 to Close the Defrag program
  45. WshShell.Sendkeys "%{F4}"

n°1636698
blueteen
Posté le 09-07-2004 à 17:38:42  profilanswer
 
n°1636728
Grumly-
Powered by swiffer
Posté le 09-07-2004 à 18:04:22  profilanswer
 

blueteen a écrit :

trouvé sur un forum
 

Code :
  1. 'End - Send an ALT-F4 to Close the Defrag program
  2. WshShell.Sendkeys "%{F4}"



 
 
le truc c que ca m ouvre notepad quand j essaye de le lancer :D


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Windows & Software
  Win NT/2K/XP

  planifier l arret d'un service ?

 

Sujets relatifs
son du démarrage et arrêt WindowsService sous Windows et désintallation
qui me rendrais ce service ?Service Pack 1
probleme d'instalation service pack 1 win xpUn service de groupe ?
irql_not_less_or_equal ou l'arrêt 0x0000000Autiliser typsoft FTP comme un service windows
[Virus] retire l'arret de l'ordinateurXP Service Pack 2
Plus de sujets relatifs à : planifier l arret d'un service ?


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR