BSDX2E ;IHS/OIT/MJL - ENVIRONMENT CHECK FOR WINDOWS SCHEDULING [7/11/12 9:37am] ;;1.7T2;BSDX;;Jul 11, 2012;Build 18 ; Licensed under LGPL ; S LINE="",$P(LINE,"*",81)="" S XPDNOQUE="NO QUE" ;NO QUEUING ALLOWED S XPDABORT=0 I '$G(DUZ) D SORRY("DUZ UNDEFINED OR 0") Q ; I '$L($G(DUZ(0))) D SORRY("DUZ(0) UNDEFINED OR NULL") Q ; D HOME^%ZIS,DT^DICRW S X=$P($G(^VA(200,DUZ,0)),U) I $G(X)="" W !,$$C^XBFUNC("Who are you????") D SORRY("Unknown User") Q ; VERSION ; W !,$$C^XBFUNC("Hello, "_$P(X,",",2)_" "_$P(X,",")) W !!,$$C^XBFUNC("Checking Environment for Install of Version "_$P($T(+2),";",3)_" of "_$P($T(+2),";",4)_".") ; Q:'$$VERCHK("VA FILEMAN",22) Q:'$$VERCHK("KERNEL",8) Q:'$$VERCHK("XB",3) ;Is the PIMS requirement present? Q:'$$VERCHK("SD",5.3) ; Q:'$$PATCHCK("PIMS*5.3*1003") D Q:'$$VERCHK("BMX",4) ; OTHER ; ;Other checks ; ENVOK ; If this is just an environ check, end here. W !!,$$C^XBFUNC("ENVIRONMENT OK.") ; ; The following line prevents the "Disable Options..." and "Move ; Routines..." questions from being asked during the install. I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0 ; ; ;VERIFY BACKUPS HAVE BEEN DONE ;W !! ;S DIR(0)="Y" ;S DIR("B")="NO" ;S DIR("A")="Has a SUCCESSFUL system backup been performed??" ;D ^DIR ;I $D(DIRUT)!($G(Y)=0) S XPDABORT=1 S XPX="BACKUP" D SORRY Q ;S ^TMP("BPCPRE",$J,"BACKUPS CONFIRMED BY "_DUZ)=$H ; Q ; VERCHK(XPXPKG,XVRMIN) ; S X=$$VERSION^XPDUTL(XPXPKG) W !!,$$C^XBFUNC("Need at least "_XPXPKG_" "_XVRMIN_"....."_XPXPKG_" "_$S(X'="":X,1:"Is Not")_" Present") I X0 BSDXFDA(101.01,ORUIEN_SDEVTIENS,.01)="@" S:DVBAIEN>0 BSDXFDA(101.01,DVBAIEN_SDEVTIENS,.01)="@" D:$D(BSDXFDA) FILE^DIE("","BSDXFDA","BSDXMSG") ; If error I $D(BSDXMSG) D MES^XPDUTL("Error: ",BSDXMSG("DIERR",1,"TEXT",1)) ; ; ; Now put in the default values for parameters ; BSDX AUTO PRINT RS as false ; BSDX AUTO PRINT AS as false ; N BSDXERR D PUT^XPAR("PKG","BSDX AUTO PRINT RS",1,0,.BSDXERR) I $G(BSDXERR) W $C(7),"Error: ",BSDXERR D PUT^XPAR("PKG","BSDX AUTO PRINT AS",1,0,.BSDXERR) I $G(BSDXERR) D MES^XPDUTL("Error: ",BSDXERR) QUIT ; SORRY(XPX) ; K DIFQ S XPDABORT=1 W !,$$C^XBFUNC($P($T(+2),";",3)_" of "_$P($T(+2),";",4)_" Cannot Be Installed!") W !,$$C^XBFUNC("Reason: "_XPX_".") W *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your environment") W !,$$C^XBFUNC("Aborting "_XPDNM_" install!") W !,$$C^XBFUNC("Correct error and reinstall otherwise") W !,$$C^XBFUNC("please print/capture this screen and notify") W !,$$C^XBFUNC("technical support") W !!,LINE D BMES^XPDUTL("Sorry....something is wrong with your environment") D BMES^XPDUTL("Enviroment ERROR "_$G(XPX)) D BMES^XPDUTL("Aborting "_XPDNM_" install!") D BMES^XPDUTL("Correct error and reinstall otherwise") D BMES^XPDUTL("please print/capture this screen and notify") D BMES^XPDUTL("technical support") Q ;