*** µÑÇËÅÑ¡ ÍÂÙèã¹ \Pipop\Gdrive\Software&Driver\C#\WinRG
txtFolder=  "E:\_Cloud\Com\Backup\"
txtExe="Win019"
txtExeOp=Iif(TimeInAct()=1,"E","E")
*ntxtExeOp=TimeInAct()
*Do Case 
*Case ntxtExeOp=1
*	txtExeOp='E'
*Otherwise
*	txtExeOp='E'
*EndCase
txtExe=Alltrim(txtExe)
txtExeOp=Alltrim(txtExeOp)
TxtWRG=""

Do Case
Case File(txtFolder+"WinRgtxt.no")
    ***
Case File("C:\Prog_32B\u"+txtExe+".exe") && Work In C:
    TxtWRG="Run /n "+"C:\Prog_32B\u"+txtExe+Space(1)+txtExeOp
Case File(txtFolder+"DEC\"+txtExe+".exe") && Work In Cloud
    TxtWRG="Run /n "+txtFolder+"DEC\"+txtExe+Space(1)+txtExeOp
Case File("D:\BdPos\"+txtExe+".exe") && Work In C:
    TxtWRG="Run /n "+"D:\BdPos\"+txtExe+Space(1)+txtExeOp
EndCase
If File(txtFolder+"TRANSAC.ZP")
	txt="Copy To "+txtFolder+"WinRgtxt Type Sdf"
Else 
	txt=""
Endif 
*******
Create Cursor WinRgtxt (cWinRgtxt C(100))
Select WinRgtxt
Append Blank 
Replace cWinRgtxt With txtFolder

Append Blank 
Replace cWinRgtxt With Dtoc(Date())+','+Time()

Append Blank 
Replace cWinRgtxt With TxtWRG

Append Blank 
Replace cWinRgtxt With Txt
&txt
If !File('D:\BdPos\WinRGdir.Txt') .and. File("D:\BdPos\FoxProw.exe")
    Copy To D:\BdPos\WinRGdir.Txt Type Sdf
Endif 
Use In WinRgtxt

&TxtWRG

Return 





Function TimeInAct
nTime=0
If Dow(Date())=1 .or. Dow(Date())=5 .or. Dow(Date())=7 
	If Between(Time(),'00','06')	
		nTime=1
	Endif 
Endif 
Return nTime






