parameter pldemo_flg,plcalledfromclient,plNetWorkUser

_screen.Caption = "AUTOSOFT"

SET PROCEDURE TO prof70lib
SET PROCEDURE TO copylock ADDITIVE

IF FILE('AUTOPARA.DBF')
	RENAME autoPara.dbf TO autoPara90.dbf 
ENDIF 
IF ! FILE('autoPara90.DBF')
	DO err_msg WITH 'AUTOSOFT PARAMETER FILE NOT FOUND' + CHR(13) + 'CONTACT CUSTOMER CARE'
	RETURN 
ENDIF

PUBLIC gcVfpVersion,gcndefcompno as String 
gcVfpVersion = '7.0'
USE autoPara90 IN 0
IF FSIZE('vfpVersion','autoPara90') = 0
	USE IN autoPara90
	USE autoPara90 IN 0 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','vfpVersion','C(5)'	
	UPDATE autoPara90 SET vfpVersion = '7.0'
ENDIF
USE IN autoPara90
_screen.WindowState = 2
_screen.Width = 1280
_screen.Visible = .T.
_screen.Closable = .F.
_screen.MaxWidth = -1
_screen.MaxHeight = -1
_screen.MinHeight = -1
_screen.MaxLeft = -1
_screen.MaxButton = .F.
_SCREEN.BorderStyle = 2
_SCREEN.Movable = .F.
**MESSAGEBOX("AUTOSOFT is under upgradation for GRAPH and E-MAIL facility")
&& sendMail  and graphSample.scx
SET EXCLUSIVE OFF
ON KEY
PUBLIC gcVORFlg as String 		&& && VOR amount to be asked in Counter bill or Not
PUBLIC gcMBFlg,glNetworkAutosoftFlag as String
gcMBFlg = ''
gcVORFlg = ''
IF PARAMETERS() = 0
	pldemo_flg = .F.
	plcalledfromclient = .F.
	plNetWorkUser  = .F.
ENDIF
***	SET PROCEDURE TO prof70lib
***	SET PROCEDURE TO copylock ADDITIVE
&& = SYS(2700,0)	&& Disable Windows XP Thems
do prof_env
DO auto_env IN auto_lib
do prof_wind
DO wait_msg
do prof_key
do prof_var
DO DefineGlobalVar IN vfplib
*** VIREN
IF ! foundconfigrationfile()
	DO err_msg WITH 'Configration file not found' + CHR(13) + 'This file will be created automatically' + CHR(13) + 'Pl. reload the software'
	CLOSE all
	CANCEL 
ENDIF
IF ! FILE('chk_exclusive.dbf')
	CREATE TABLE chk_exclusive.dbf (dummy c(1))
ENDIF 	
PUBLIC glcalledfromclient,gdoutof_date,gcversion,gcMenuName

glcalledfromclient = .F.
glcalledfromclient = plcalledfromclient
gldemo_flg = pldemo_flg
gLNetworkAutosoftFlag = plNetWorkUser
gcMenuName = ' '

PUBLIC gcPwdKey 
gcPwdKey = 'WIPRAWORLDWIDE'
IF ! gldemo_flg and plcalledfromclient = .F.
	IF ! FILE('wiprainst.SYS')
		DO FORM REGISTER
	ELSE 
		RESTORE FROM wiprainst.SYS addi 
		IF mregistered = 'N'
			IF DATE() > mdue_dt
				do FORM payment_reminder
			ELSE
				lndays_remain = mdue_dt - DATE()
				IF ! FILE('WIPRA0001.SYS')
					IF ! FILE('control.txt')
						gdCurrentPrevDt = DATE()
						SAVE ALL LIKE gdCurrentPrevDt TO WIPRA0001.SYS
					ELSE 
						RESTORE from control.txt additive 
						SAVE  ALL LIKE gdCurrentPrevDt TO WIPRA0001.SYS
					ENDIF 
				ENDIF 
				RESTORE from WIPRA0001.SYS additive
				IF DATE() < gdCurrentPrevDt
					IF YESNO('Sorry' + 'As per computer Previously last entry date was ' + DTOC(gdCurrentPrevDt) + CHR(13) + 'Currently it is : ' + DTOC(DATE()) + ' As you do not have rights in working in previous date' + CHR(13) + 'you will allowed to work') = "YES"
						IF ! superuser()
							DO err_msg WITH 'SORRY YOU ARE NOT SUPER USER' + CHR(13) + 'YOU CAN NOT CHANGE SERVER DATE OPTION'
							RETURN .f.
						ELSE
							DELETE FILE WIPRA0001.SYS
							DELETE FILE CONTROL.TXT
							MESSAGEBOX("Opearation completed" + CHR(13) + "Please rerun AUTOSOFT","AUTOSOFT",0+16)
							CLOSE ALL
							CANC
						ENDIF 						
					ELSE
						QUIT 
					ENDIF
				ENDIF 
				DO form payment_reminder
			ENDIF 
		ENDIF
	ENDIF 
ENDIF

IF ! file('INFO.SYS')
	IF FILE('PWDKEY.WWW')
		RESTORE FROM PWDKEY.WWW ADDITIVE 
	ENDIF
	USE PASSWORD IN 0
	SELE PASSWORD
	COPY TO INFO.SYS WITH CDX
	USE IN PASSWORD
	DELE FILE PASSWORD.DBF
ENDIF

CLEAR 
MODIFY window SCREEN title 'AUTOSOFT - A Complete Software for Automobile Showroom & Workshop' icon file prof_ico.ico
set date british

SET talk  OFF 
set excl off
public mprog_path,gchide_key,gcworkshop,gcshowroom,gcsubdealer,gcratesource,gcMarketFlg,gcOctType,gcbypassdt,gcAutosmsLnk
PUBLIC GCSBILNAME,gcjbilname,gccbilname,gcsletrnam,gcdcname,gcsrname,gcmodipurbillamtflg,gcaskoctrt
PUBLIC gcstaxamtflg, gcItpurwithtax,gcnegative_flg,gccompany_no,gcrtomakrcod
PRIVATE gcSplitDailyBackupProcess
STORE ' ' TO gchide_key

DO FORM autosoft

if ! (file('autoPara90.DBF') or file('autoPara90.dbf'))
	do err_beep
	do err_msg with 'AUTOSOFT Configration file not found' + CHR(13) + 'Contact your System Administrator/Vendor'
	QUIT 
ENDIF
PRIVATE lcOnError
PUBLIC GCPROTECTDBC,GcDebugeFlg
gcPROTECTDBC = ''
lcOnError = ON('ERROR')
use autoPara90
mprog_path = ALLTRIM(proj_path)
IF ! haveFullAccessRightsInFolder(mprog_path)
	DO FORM critical_warning WITH "YOU DO NOT HAVE SUFFICIENT RIGHTS or FOLDER : " + mprog_path + CHR(13) + "does not exist" + CHR(13) + "PL. contact your ADMINISTRATOR"
	CANCEL
ENDIF
gcbypassdt = ALLTRIM(bypassdt)
gcAutosmsLnk = ALLTRIM(autosmslnk)
GcBatteryFlg = BatteryFlg
IF FSIZE('debugeflg','autoPara90') = 0	&& Added on 12/01/13 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','debugeflg','C(1)'	
	USE IN autoPara90
	USE autoPara90	
ENDIF
GcDebugeFlg = autoPara90.debugeflg
IF FSIZE('splitBckup','autoPara90') = 0	&& Added on 12/01/13 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','splitBckup','C(1)'	
	USE IN autoPara90
	USE autoPara90	
ENDIF
gcSplitDailyBackupProcess = autoPara90.splitBckup
&& Add Multibranch Flag in autoPara90 if not found in autoPara90	DT. : 17/1/12	Priten

IF FSIZE('MBFLG','autoPara90') = 0 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','mbFlg','C(1)'	
	USE IN autoPara90
	USE autoPara90	
ENDIF

&& Add VORFlg in autoPara90 if not found	Dt. 31/1/12
IF FSIZE('VORFlg','autoPara90') = 0 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','VORFlg','C(1)'	
	USE IN autoPara90
	USE autoPara90	
ENDIF

&& Add menuName if not found in autoPara90     Dt. 25/4/11   by Priten
IF FSIZE('cliSearch','autoPara90') = 0 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','cliSearch','C(10)'	
	USE IN autoPara90
	USE autoPara90	
ENDIF
IF FSIZE('menuName','autoPara90') = 0 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','menuName','C(20)'	
	USE IN autoPara90
	USE autoPara90	
ENDIF
IF FSIZE('SSPFLG','autoPara90') = 0 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','SSPFLG','C(1)'	&& DT 12/09/2008  BY PRITEN
	USE IN autoPara90
	USE autoPara90	
ENDIF
IF FSIZE('PROTECTDBC','autoPara90') = 0 
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','PROTECTDBC','C(1)'	&& DT 12/09/2008  BY PRITEN
	USE IN autoPara90
	USE autoPara90	
ENDIF
IF FSIZE('VERSIONTYP','autoPara90') = 0 	&& DT 01/11/2009  BY PRITEN
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','VERSIONTYP','C(10)'	
	USE IN autoPara90
	USE autoPara90	
ENDIF
gcAutosoftEco = versionTyp
GCPROTECTDBC = PROTECTDBC
gcSspFlg     = sspFlg
IF FSIZE('VERSION','autoPara90') < 15
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	IF FSIZE('VERSION','autoPara90') > 0
		ALTER TABLE autoPara90 drop COLUMN VERSION
	ENDIF
	DO ADDFIELD WITH 'autoPara90','VERSION','C(15)'	&& DT 01/12/2008  BY PRITEN
	USE IN autoPara90
	USE autoPara90	
ENDIF
IF FSIZE('OUTOF_DATE','autoPara90') = 0
	USE IN autoPara90
	USE autoPara90 EXCLUSIVE 
	DO ADDFIELD WITH 'autoPara90','OUTOF_DATE','D'	&& DT 01/12/2008  BY PRITEN
	REPLACE OUTOF_DATE WITH CTOD('10/07/2009')
	USE IN autoPara90
	USE autoPara90	
ENDIF
gcversion = autoPara90.version
GdOUTOF_DATE = autoPara90.OUTOF_DATE
gcMBFlg   = autoPara90.mBFlg	&& Multi branch Functionality
gcVORFlg  = autoPara90.VORFlg
IF gcversion <> '7.5.06.1'
	DO ALERT WITH 'YOU LASTLY UPGRADED SOFTWARE FOR VERSION : ' + GCVERSION + CHR(13) + 'CURRENT VERSION IS 7.5.11.1' + CHR(13) + 'PL. RUN UPGRADE OPTION FOR EACH COMPANY AND YEAR FOR SMOOTH OPERATUION'
ENDIF
IF GdOUTOF_DATE < CTOD('10/07/2009')
	DO ALERT WITH 'YOUR CURRENT VERSION MAY BE OUT OF DATE AS AUTOSOFT IS UPGRADED EVERY MONTH' + CHR(13) + 'CONTACT WIPRA WORLD WIDE CUSTOME CARE FOR LATEST UPGRADE' + CHR(13) + 'CURRENT VERSION BECOMES OUT OF DATE ON' + DTOC(GdOUTOF_DATE) + CHR(13) + 'THANKS'
ENDIF
IF glcalledfromclient
	ON ERROR WAIT '' time .1
	USE AUTOSOFT IN 0 EXCLUSIVE
	ON ERROR &lcOnError
	IF USED('AUTOSOFT') = .T.
		USE IN autosoft
		MESSAGEBOX('UNAUTHORISED DUPLICATION' + CHR(13) + 'or AUTOSOFT is Not running on Server' + CHR(13) + 'Run it on the server and try again',0+64,"ATTENTION")
		CLOSE ALL
		QUIT 
	ENDIF 
ELSE 
	ON ERROR WAIT '' time .1
	USE AUTOSOFT IN 0 EXCLUSIVE
	ON ERROR &lcOnError
	if ! realuser()
		DO FORM LICENCE 
		quit
	endif	
	IF ! DIRECTORY(mprog_path + '\DATA\OUTPUT')
		MD mprog_path + '\DATA\OUTPUT'
	ENDIF 
	IF ! DIRECTORY(mprog_path + '\DATA\EXCEL')
		MD mprog_path + '\DATA\EXCEL'
	ENDIF 
	IF ! DIRECTORY(mprog_path + '\DATA\EXPORT')
		MD mprog_path + '\DATA\EXPORT'
	ENDIF 
ENDIF
USE autoPara90
IF FSIZE('hide_key') = 0
	USE autoPara90 EXCLUSIVE
	DO ADDFIELD WITH 'autoPara90','hide_key','C(10)'		&& DT 11/07/07  BY RAMESH
	REPLACE hide_key WITH 'CTRL+F10'
	USE IN autoPara90
	USE autoPara90
ENDIF
IF FSIZE('ExWarFlg') = 0
	USE autoPara90 EXCLUSIVE
	DO ADDFIELD WITH 'autoPara90','ExWarFlg','C(1)'		&& DT 3/03/10  BY Priten
	USE IN autoPara90
	USE autoPara90
ENDIF
gchide_key = hide_key
mrelease_dt = ctod('01/04/2011')
gcversion = "2011"
gconlineflg = onlineflg
gcMarketFlg = MarketFlg
gcautokey = ENCODE('WIPRAWORLDWIDE')
gcExtendedWarrantyFlg = autoPara90.ExWarFlg
gccliSearch = autoPara90.cliSearch
gcMenuName  = autoPara90.menuName
if ! (file('AUTOSOFT.DBF') or file('autosoft.dbf'))
	do err_beep
	DO ALERT WITH '!!! ERROR !!!;AUTOSOFT CONFIGRATION FILE(AUTOSOFT.DBF) NOT FOUND;;CONTACT YOUR SYSTEM ADMINISTRATOR/VENDOR'
	QUIT
ENDIF
IF ! FILE('COMPANYYEAR.DBF')
	DO COPYFOLDER
ENDIF
USE COMPANYYEAR
IF FSIZE('VEHICLETYP','COMPANYYEAR') = 0		&& ADD EMAIL C 25 IN COMPANY YEAR , IF NOT FOUND.... DT. 17/04/2011
	USE IN COMPANYYEAR 
    USE COMPANYYEAR EXCLUSIVE 
    DO ADDFIELD WITH 'COMPANYYEAR','VEHICLETYP','C(15)'
    IF DEALEROF = 'MAN' OR DEALEROF = 'SWARAJ' 
		UPDATE COMPANYYEAR SET VEHICLETYP = 'FOUR WHEELER'
	ELSE 
		UPDATE COMPANYYEAR SET VEHICLETYP = 'TWO WHEELER'
    ENDIF 
ENDIF     
IF FSIZE('EMAIL') = 0		&& ADD EMAIL C 25 IN COMPANY YEAR , IF NOT FOUND.... DT. 17/04/2011
	USE IN COMPANYYEAR 
    USE COMPANYYEAR EXCLUSIVE 
    DO ADDFIELD WITH 'COMPANYYEAR','EMAIL','C(25)'
ENDIF     
IF FSIZE('HIDE_FLG') = 0
	USE IN COMPANYYEAR 
    USE COMPANYYEAR EXCLUSIVE 
    DO ADDFIELD WITH 'COMPANYYEAR','HIDE_FLG','C(1)'
ENDIF     
IF FSIZE('CONSTITUTN','companyyear') = 0
	USE IN COMPANYYEAR 
    USE COMPANYYEAR EXCLUSIVE 
    DO ADDFIELD WITH 'companyyear','constitutn','C(20)'
ENDIF
IF FSIZE('createflg') = 0 or FSIZE('CF_BOOKING') = 0 OR FSIZE('CF_DC') = 0 OR FSIZE('CF_JOBCARD') = 0
	USE IN COMPANYYEAR 
    USE COMPANYYEAR EXCLUSIVE 
    DO ADDFIELD WITH 'COMPANYYEAR','CREATEFLG','C(1)'
    DO ADDFIELD WITH 'COMPANYYEAR','CF_BOOKING','C(1)'
    DO ADDFIELD WITH 'COMPANYYEAR','CF_DC','C(1)'
    DO ADDFIELD WITH 'COMPANYYEAR','CF_JOBCARD','C(1)'
ENDIF 
IF FSIZE('rtomakrcod') = 0
	USE IN COMPANYYEAR 
    USE COMPANYYEAR EXCLUSIVE 
    DO ADDFIELD WITH 'companyyear','rtomakrcod','C(10)'
	USE IN COMPANYYEAR 
    USE companyyear IN 0 
    SELECT companyYear
ENDIF 
IF FSIZE('STATE','companyyear') = 0
	USE IN COMPANYYEAR
    USE COMPANYYEAR EXCLUSIVE 
    DO ADDFIELD WITH 'COMPANYYEAR','STATE','C(20)'
ENDIF
USE IN COMPANYYEAR

USE INFO.SYS IN 0 alia password 
IF FSIZE('LOCKUSER','PASSWORD') = 0
	USE IN password
	USE INFO.SYS IN 0 alia password EXCLUSIVE
	DO ADDFIELD WITH 'PASSWORD','LOCKUSER','C(1)'			&& DT 17/01/08  BY PRAMOD
ENDIF
IF FSIZE('labRtRight','PASSWORD') = 0							&& DT 10/04/10  BY PRiten
	USE IN password
	USE INFO.SYS IN 0 alia password EXCLUSIVE
	DO ADDFIELD WITH 'PASSWORD','labRtRight','C(1)'			
ENDIF
IF FSIZE('AGENT_NO','PASSWORD') = 0							&& DT 10/04/10  BY PRiten
	USE IN password
	USE INFO.SYS IN 0 alia password EXCLUSIVE
	DO ADDFIELD WITH 'PASSWORD','AGENT_NO','C(3)'			
	INDEX ON AGENT_NO TAG AGENT_NO ASCENDING ADDITIVE 
ENDIF

IF FSIZE('LEDRIGHTS','PASSWORD') = 0
	USE IN password
	USE INFO.SYS IN 0 alia password EXCLUSIVE
	DO ADDFIELD WITH 'PASSWORD','LEDRIGHTS','C(1)'			&& DT 16/09/13  BY PRAMOD
ENDIF
USE IN password
*DO auto_env in auto_lib
*do auto_key in auto_lib
*do auto_wind in auto_lib

IF SYSMETRIC(1) <> 1024 AND SYSMETRIC(2) <> 768
	DO ATTENTION WITH 'FOR BETTER DISPALY RESULT' + CHR(13) + 'DISPLAY SETTING OF COMPUTER SHOULD BE' + CHR(13) + CHR(13) + '1024 X 768' + CHR(13) + CHR(13) + 'CONTACT YOUR HARDWARE VENDOR FOR MORE DETAIL'
ENDIF
IF GCBYPASSDT <> "Y"
	IF FILE(mprog_path + 'WIPRA0001.SYS')
		RESTORE from WIPRA0001.SYS additive 
		IF DATE() < gdCurrentPrevDt
			IF glcalledfromclient
				IF YESNO('SERVER DATE IS : ' + DTOC(gdCurrentPrevDt) + CHR(13) + 'your computer date is : ' + DTOC(DATE()) + CHR(13) + 'your date can not be less then Server Date' + CHR(13) + 'you will allowed to work') = "YES"
					IF ! superuser()
						DO err_msg WITH 'SORRY YOU ARE NOT SUPER USER' + CHR(13) + 'YOU CAN NOT CHANGE SERVER DATE OPTION'
						RETURN .f.
					ELSE
						DELETE FILE ALLTRIM(MPROG_PATH) + '\WIPRA0001.SYS'
						DELETE FILE ALLTRIM(MPROG_PATH) + '\CONTROL.TXT'
						MESSAGEBOX("PRESSED OK TO QUIT THIS PROGRAMM AND RESTART AGAIN","AUTOSOFT",0+16)
						CLOSE ALL
						CANC
					ENDIF 						
				ELSE 
					CLOSE ALL
					QUIT
				ENDIF 
			ELSE 
				IF YESNO('Sorry' + 'As per computer Previously last entry date was ' + DTOC(gdCurrentPrevDt) + CHR(13) + 'Currently it is : ' + DTOC(DATE()) + ' As you do not have rights in working in previous date' + CHR(13) + 'you will allowed to work') = "YES"
					IF ! superuser()
						DO err_msg WITH 'SORRY YOU ARE NOT SUPER USER' + CHR(13) + 'YOU CAN NOT CHANGE SERVER DATE OPTION'
						RETURN .f.
					ELSE
						DELETE FILE ALLTRIM(MPROG_PATH) + '\WIPRA0001.SYS'
						DELETE FILE ALLTRIM(MPROG_PATH) + '\CONTROL.TXT'
						MESSAGEBOX("PRESSED OK TO QUIT THIS PROGRAMM AND RESTART AGAIN","AUTOSOFT",0+16)
						CLOSE ALL
						CANC
					ENDIF 						
				ELSE 
					QUIT 
				ENDIF 
			ENDIF 
		ELSE 
			IF DATE() <> gdCurrentPrevDt and glcalledfromclient
				IF YESNO('SERVER DATE IS : ' + DTOC(gdCurrentPrevDt) + CHR(13) + 'your computer date is : ' + DTOC(DATE()) + CHR(13) + 'your date must be same as Server Date' + CHR(13) + 'you will allowed to work') = "YES"
					IF ! superuser()
						DO err_msg WITH 'SORRY YOU ARE NOT SUPER USER' + CHR(13) + 'YOU CAN NOT CHANGE SERVER DATE OPTION'
						RETURN .f.
					ELSE
						DELETE FILE ALLTRIM(MPROG_PATH) + '\WIPRA0001.SYS'
						DELETE FILE ALLTRIM(MPROG_PATH) + '\CONTROL.TXT'
						MESSAGEBOX("PRESSED OK TO QUIT THIS PROGRAMM AND RESTART AGAIN","AUTOSOFT",0+16)
						CLOSE ALL
						CANC
					ENDIF 						
				ELSE 
					CLOSE ALL
					QUIT
				ENDIF 
			ENDIF 		
			IF glcalledfromclient = .f.
				gdCurrentPrevDt = DATE()
				SAVE all like gdCurrentPrevDt to WIPRA0001.SYS 
			ENDIF 
		ENDIF 
	ELSE
		gdCurrentPrevDt = DATE()
		SAVE all like gdCurrentPrevDt to WIPRA0001.SYS 
	ENDIF
ENDIF
gdCurrentDt = DATE()
IF FILE('WIPRALIST.TST')
	RESTORE FROM WIPRALIST.TST ADDITIVE 
	IF GDINSTALLDT <= DATE()
		DO ALERT WITH 'RESPECTED SIR' + CHR(13) + 'PAYMENT OF YOUR SOFTWARE IS OVER DUE' + CHR(13) + 'SOFTWARE WILL BE TERMINATED' + CHR(13) + CHR(13) + 'KINDLY SEND BALANCE PAYMENT TO WIPRA WORLD WIDE' + CHR(13) + 'TO ACTIVATE SOFTWARE' + CHR(13) + 'THANK YOU'
		RENAME COMPANY.DBF TO C.OLD 
		RENAME AUTOCLIENT.EXE TO AC.EXE 
		CLOSE ALL
		CANCEL 
	ELSE 
		IF GDINSTALLDT <= DATE() + 7
			DO ALERT WITH 'RESPECTED SIR' + CHR(13) + 'PAYMENT OF YOUR SOFTWARE IS OVER DUE' + CHR(13) + 'SOFTWARE WILL BE TERMINATED AFTER' + ALLTRIM(STR(GDINSTALLDT - DATE())) + 'DAYS' + CHR(13) + CHR(13) + CHR(13) + 'KINDLY SEND BALANCE PAYMENT TO WIPRA WORLD WIDE' + CHR(13) + 'TO ACTIVATE SOFTWARE' + CHR(13) + 'THANK YOU'
		ENDIF 
	ENDIF 
ENDIF
IF ! FILE('WIPRACHK.TST')
	USE ACCESSRIGHTS IN 0
	COPY TO WIPRACHK.TST WITH CDX 
	USE IN ACCESSRIGHTS 
ENDIF
DO FORM LOGIN
gcUserName = minitial
DO GETCOMPANY
IF ! FILE('DBCSECURITY.FXP')
	use dbcsecurity IN 0
	SELECT dbcsecurity
	COPY MEMO DBC_INFO TO dbcsecurity.FXP
	USE IN dbcsecurity
ENDIF
QUIT