1 Reply Latest reply on Mar 20, 2014 2:41 PM by wimdecorte

    Execute a Windows command file from FMP?


      Can I have Windows execute a command file by using Send Event?



      E.g a FM file running on the Master OS will check (via various scripting) if a VM on the same hardware is functioning correctly (spefically if FMS + WPE is running) If not I would like FM to tell Windows 2012 to shut it down and reboot it.


      Does this make any sense?

        • 1. Re: Execute a Windows command file from FMP?

          Anything you can execute from the windows command line can be done through Send Event.


          Start with "cmd /c " and if you have multiple commands string them together with "&" or "&&".  The Windows help on command line will give you a lot of good info.


          Another way of doing it if you need more power is to construct your VBscript or PowerShell syntax in a global field, use Export Field Contents to export it to the hard disk and then use Send Event to execute it.


          Plugins can be used too.