> > PROCEDURE VerifyPrinterSetup() > > PRIVATE laSetups[1] > > LOCAL lcCmd, lcFailureConditions > > lcFailureConditions = ; > " APRINTERS(laSetups) = 0 OR " + ; > " ASCAN(laSetups,[" + ; > THIS.PSDriverSetupName+"],1,ALEN(laSetups,1),1,7) = 0 " > > * check for the existance of the appropriate printer driver > * if it is not there, attempt to install > * if it is not installed after attempt, > * return .F. > > IF &lcFailureConditions. > > THIS.DoStatus(INSTALLING_DRIVER_LOC) > > lcCmd = ; > [%windir%\\system32\\rundll32.exe ] + ; > [printui.dll,PrintUIEntry /if /b ] + ; > ["] + THIS.PSDriverSetupName + ["] + ; > [ /f %windir%\\inf\\ntprint.inf /r "lpt1:" /m "] + ; > DRIVER_TO_USE + [" /Z] > > llReturn = ; > THIS.oWinAPI.ProgExecute( ; > lcCmd,lcFailureConditions,THIS.WaitAttempts) > > THIS.ClearStatus() > > ENDIF > > RETURN APRINTERS(laSetups) > 0 AND ; > ASCAN(laSetups,THIS.PSDriverSetupName,1,ALEN(laSetups,1),1,7) > 0 > > ENDPROC > >