Ghost Solution Suite

 View Only
  • 1.  ghost explorer quiet mode switch

    Posted Jan 29, 2014 01:26 PM

    I am calling up ghost explorer from within a php script using the exec() command

    echo exec ('X:\scan_ghost\Ghostexp.exe -tf="X:\scan_ghost\temp\catalogue.txt" "X:\upload\Stack.gho"');

    This scans the ghost image and outputs the contents to a text file (which we later check for the occurrence of certain files)

    All works fine untill ghost has reason to put up an alert window such as "Not a ghost image file" or  "Stack.gho does not exist".

    Because It has been called from php I do not see the message box or get the opportunity to respond to it. Therefore my php program hangs as it fails to complete as ghost explorer is still running. I am not really interested in the message box or the alert message as I can check for the absence of the txt file or its contents later.

    So .....How do I get ghost explorer to close elegantly and automatically on a failure. I know there is a quiet switch and a batch switch in ghost itself but it appears there isn't one for ghost explorer.

    Any help on this would be greatly appreciated as I have spent most of the day trying to come up with a work round.

    Thank you

     



  • 2.  RE: ghost explorer quiet mode switch
    Best Answer

    Posted Jan 29, 2014 01:54 PM

    Check out a program called AutoIT from Hiddensoft. You can use this to monitor windows popping up and respond accordingly. Alternatively, you could use TaskKill to kill the running process if an output is not obtained within a default time.



  • 3.  RE: ghost explorer quiet mode switch

    Posted Jan 30, 2014 08:49 AM

    Thank you very much for your advice. I will consider both options and advise progress. (looks like AutoIT is quite involved, so might take a while).

    Really appreciate your input.

    Thank you.



  • 4.  RE: ghost explorer quiet mode switch

    Posted Feb 03, 2014 12:53 PM

     

    Cheers, all sorted now. Thank you for your suggestions.

    Resolution was to kick off the ghostexplorer task in the background and catch its PID (so it didn't wait for completion) from php using $WshShell->Run

    .. and at the same time start a timeout using tasktill to stop the PID after a 5mins

    If we have a text file, ghostexp finished the scan, will have closed itself down and created the file - which we then check for the occurrence of specific files.

    If after 5 mins we have no file we assume ghost has failed or is waiting for an input, we quarantine the imagefile and the timeout takes care of stopping the ghostexp process.

    Thanks again!



  • 5.  RE: ghost explorer quiet mode switch

    Posted Feb 03, 2014 01:09 PM

    Glad to hear you were able to get this sorted using tools you have experience with already - always the best way.  I would be grateful if you could use the "mark as solution" flag to mark the answer that most helped you.