Saturday, August 19, 2017

puppet :: How to run bginfo via the scheduler

I won't go in to details about bginfo. There are plenty of articles on the internet about bginfo. I won't go in to details about the scheduler either for the same reason. In this blog post, I will explain how I use puppet to tell the scheduler to run bginfo.

The first thing you need to do is to install bginfo.exe somewhere and then configure bginfo to display the statistics you want. Then, create a scheduled task to run bginfo.exe at logon (for what user or maybe all users who log on). You can also tell the scheduler to execute every 5 minutes while the user is logged on. That way, while the user is logged on, the information stays fresh and if the user is not logged on, don't waste cpu cycles.

Now that you've got it running successfully on one of your servers, all you need to do is export your bginfo xml template file and your scheduled task. Place those two files on your puppet server.


In your puppet module, use this code to import the scheduled task.

 file {
    "c:\\sbin":
      ensure => directory,
  }

  file {
    "c:\\sbin\\Bginfo.exe":
      ensure  => present,
      require => File["c:\\sbin"],
      source  => "puppet:///modules/sysinternals/Bginfo.exe",
  }

  file {
    "c:\\sbin\\mycustomFile.bgi":
      ensure => present,
      require => File["c:\\sbin\\Bginfo.exe"],
      source  => "puppet:///modules/sysinternals/mycustomFile.bgi",
  }

  file {
    "c:\\sbin\\bginfo.xml":
      ensure  => present,
      require => File["c:\\sbin\\mycustomFile.bgi"],
      source  => "puppet:///modules/sysinternals/bginfo.xml",
  }

  exec {
    "schtasks_bginfo":
      command => "c:\\Windows\\System32\\schtasks.exe /Create /XML c:\\sbin\\bginfo.xml /TN bginfoFG2",
      unless  => "c:\\Windows\\System32\\schtasks.exe /Query /TN BginfoFG2",
      require => File["c:\\sbin\\bginfo.xml"],
  }



1 comment:

  1. EFFECTIVE AND POWERFUL LOVE SPELL CASTER AND LOTTERY SPELL 2019 GBOJIESPIRITUALTEMPLE@GMAIL. COM OR WHATSAPP HIM :+2349066410185

    Hi i am from USA I have just experience the wonders of Dr. gbojie love spell, that have been spread on the internet and worldwide, How he marvelously helped people all over the world to restored back their marriage life and get back lost lovers, and also help to win lottery. I contacted him after going through so many testimonies from different people how he help to bring back ex lover back, i told him about my husband that abandoned me about 8 months ago, and left home with all i had.. Dr GBOJIE only told me to smile and have a rest of mind he will handle all in just 24 hours, After the second day my husband called me, i was just so shocked, i pick the call and couldn't believe my ears, he was really begging me to forgive him and making promises on phone.. He came back home and also got me a new car just for him to proof his love for me. i was so happy and called Dr Gbojie and thanked him, he only told me to share the good news all over the world .. Well if you need an effective and real spell caster contact Dr gbojie Via email: gbojiespiritualtemple@gmail.com, gbojiespiritualtemple@yahoo.com or Call or WhatsApp: +2349066410185 website : http://gbojiespiritualtemple.website2.me/
    blog : https://unitedinloveandrelationship.blogspot.com

    ReplyDelete