The code you showed me goes into the UpdatePerform.prg.
PROCEDURE UpdatePerform
... your code
RETURN .T.
ENDPROC
Inside your Main.prg before you create the application object goApp = CREATEOBJECT("cCusApp"):
IF FILE("UpdatePerform.fxp") AND EVALUATE("UpdatePerform()")
ERASE UpdatePerform.fxp
... create app now
ENDIF
... closing system statements