//
// Each line is one of the following:
//
//
//	- a comment line that begins with // in the first two columns
//
//	- a completely blank line (not even spaces or tabs)
//
//  - a line that begins with a carat, > , followed by a the name of an executable or bat file to run
//
//	- a pattern that identifies one or more processes to terminate
//
//
// Note that unlike C++ and C# source code, only whole-line comments are
// supported.  Do not add a double-slash to the end of a pattern line and
// expect it to be treated like a comment.  That won't work, and you 
// won't be happy.
//
//
// Each pattern line consists of two parts:
//
//
//	- an optional list of "algorithms" for killing the process
//
//	- a regular expression pattern that is matched against 
//	  each process' executable file name, to decide whether 
//	  that process should be terminated.
//
//
// The algorithm list, if present, begins and ends with a colon. In between
// the colons are one or more algorithm specifications, separated by commas.
// Each algorithm specification consists of three parts:
//
//
//	- the algorithm type (see below)
//
//	- the number of times to try this algorithm
//
//	- the number of milliseconds to wait between retries
//
//
// The different algorithm types are as follows:
//
//
//	- SC_CLOSE
//	  If a top-level window can be found for the process, then
//	  a WM_SYSCOMMAND message is sent to that window with a 
//	  wParam value of SC_CLOSE.  This is a standard message that
//	  the system would send to the window to close it. The code
//	  only looks for one top-level window for each process.	
//
//	- WM_CLOSE
//	  Like SC_CLOSE, but the message sent to the top-level window
//	  is the regular old WM_CLOSE message.
//
//	- EXIT_PROCESS
//	  ProcessTerminator attempts to launch a thread in the target
//	  process so that the new thread can execute the Win32 call,
//	  ExitProcess within the context of the process we are trying
//	  to kill.  This calls is supposed to force the process to
//	  shutdown, and it does so in a somewhat cleaner way than 
//	  calling TerminateProcess.
//
//	- TERMINATE
//	  ProcessTerminator will call the Win32 function TerminateProcess,
//	  passing it a handle to the process we're trying to kill. 
//	  Microsoft recommends this as a "weapon of last resort". It
//	  will kill the process with almost none of the clean-up logic that
//	  is executed when a process shutsdown normally.
//
//	- RUN
//	  ProcessTerminator will launch the specified exe to perform cleanup. 
//	  
//
// If you don't specify any algorithms, then ProcessTerminator will attempt
// to kill the process using TerminateProcess.  It will try this up to 
// five times, waiting up to one second between each try.
//
// Following the optional list of algorithms on a pattern line is the pattern 
// that will be used to match processes to kill. The pattern is a regular 
// expression, as defined by Microsoft. Here are some examples of valid pattern
// lines:
//
//
//	notepad\.exe
//
//	Terminates any process whose executable is notepad.exe.  Notice
//	the use of the backslash to escape the dot-character.  In 
//	regular expression syntax, the dot-character means "any character".
//	The two character combination "\." requires an exact match on 
//	the dot itself. Because this line does not begin with an algorithm
//	list, TerminateProcess will be used to kill any processes that
//	match this pattern (i.e., that are named notepad.exe).
//
//
//	:TERMINATE 5 1000:notepad\.exe
//
//	This line specifies an algorithm to use, TERMINATE, with 5 retries
//	and 1 second wait time (i.e., 1000 milliseconds) between each try.
//	The processes to terminate are still processes whose executable is
//	notepad.exe.  Because of the default behavior of ProcessTerminator,
//	this line is actually equivalent to the previous example.
//
//
//	:SC_CLOSE 3 5000,TERMINATE 2 1000:notepad.\exe
//
//	This line specifies two algorithms to use to kill processes whose
//	executable is notepad.exe.  ProcessTerminator will first attempt
//	to send WM_SYSCOMMAND/SC_CLOSE to the top-level window of the 
//	process.  It will try this up to three times, waiting 5 seconds
//	(5000 milliseconds) between each try.  If after these three
//	attempts (and waits) the process is still running, the code will
//	call TerminateProcess.  If necessary, the TerminateProcess call
//	will be done twice, waiting 1 second after each call.  Notice that
//	the definitions of the two algorithms are separated by a comma,
//	with no whitespace after the comma.  The current implementation
//	is fairly picky about whitespace.
//	
//
//
//
// *************************************************************************
//
//                PATTERNS ARE NOT WILD CARD EXPRESSIONS!
//
// *************************************************************************
//
//
//
// For example, to indicate a string of zero or more characters, you must use
// ".*" instead of just "*". The following regular expression:
//
//
//	Foo*.exe
//
//
// is interpreted as an "Fo" followed by zero or more occurences of 'o' followed
// by any character, followed by "exe".  If instead, you want all executables
// whose names begin with "Foo" and have an extension of ".exe", you would write
// the following:
//
//
//	Foo.*\.exe
//
//
// For more information about regular expression syntax, refer to Microsoft 
// documentation on regular expressions, or read the comment at the top of the 
// following file, in ClearCase:
//
//
//	\Retail\Tools\EpxProcessCleaner\EpxProcessCleanerImpl.h
//

//
// Retail Platform Processes 
//
btprot.exe
CisSpud.*
ContentServiceHost.*
DLX.*
EppDatabaseService.*
Epx.*
EkcGen.*
EkcKio.*
EkcRetailCrib.*
Fiam.*
Kodak.RetailPlatform.HttpProxyIPR.*
KIASControl.*
Noritsu.*
QSS.*
RPWorker.*
SubstService.*
UsbMonitor.*
RemotePrintScan.*
CDHotFolderMonitor.*
SlotBroker.*
LabManager.*
BarcodeScannerService.*
RpLabUploadProgress.*
RpWaitWorker.*
OnlineServicesMgrServer.*
RpOrderScheduler.*
RpOrderStatusServer.*
ResourceManager.*
RPServices.*
RpNet.*
BOMining.exe
RemoteCribService.*
RemoteGusService.*
RPDestinationChanger.*\.exe
ConfigMgrSrvcHost\.exe
RemoteN2ROrderTracker.*
OrderMessageSender.*

//
// CD Writer stuff
//
BufBro.*
Dasvcnt.exe
GearWriter.*
PhysicalCD.*
PictureCD.*

//
// All HOP Processes
//
30xxSimulator.exe
30xxSimulatorGUI.exe
ConsoleWrapper.exe
HOP2.*
Noritsu30XXConsole.exe

//
//Payment Processes
//
Active-Charge.*

//
//Kiosk Processes
//
KPMMain.exe
KPKXLMain.exe
attract_loop.exe
loop.exe
startup.exe
thank_you.exe
HidePopup.exe
timed_out.exe

//
// DPS900, PCM, and any other processes that begin with Kodak.
//
Kodak.*
DPS900.*

//
// Sams Rimage if it's running on Apex
//

KodakRimageService.exe


//
// Terminate KIAS server Catalina app.
//
java.exe

//
// Terminate LifePics Print@Store.
//
javaw.exe

//
// Third Party Processes
//
JobDistributor.exe
ULCDRSvr.exe
AcroRd32.exe

//
// Kodak Document Imaging components 
//
// Killing KDSTWAIN.exe will crash twaingui.exe so just kill twaingui.exe first
//
// Processterminator seems to kill processes from the bottom up so twaingui.exe 
// must be after KDSTWAIN.exe below.
//
KDSTWAIN.*
twaingui.*

// MicroTek Scanner (PS12)
ScannerFinder.exe

// 
// Third-party POS payment processing.
//
CPEnabler\.exe
wlinessl\.nt\.exe

//
// Terminate Target applications
//
KLink.exe
Init.exe
TCom.exe
EZP.PASC.exe
DENSOS~1.EXE
KDE.exe
Fx35FilmScanService.exe
Xenon1900ScannerService.exe

// CreateAtHome service
CreateAtHome.*

// Run program to turn off Wifi radio in case it was left on
>Kodak.RetailPlatform.WifiTerminator.exe

TextPopUpCommand.*

// Terminate Cumulus Windows Services. If the file doesn't exist, or some/all of the services aren't installed or running, no worries. 
>StopImplServices.bat

//
// Terminate Cumulus on developer box
//
WcfSvcHost\.exe
RP.*ImplHost\.exe

//
//AltEaterService may be running on APEX
//
AltEaterService.*
