Ever Wanted to Own and Operate a Fully Featured Dynamic DNS Service?
Now You Can With MintDNS 2009 Enterprise - - Our Award Winning Dynamic DNS Server Suite!!!
It's never been easier to run your own DDNS service.

Looking for free DDNS services? Please use our free DDNS service at http://www.geekciti.com

MintDNS Knowledge Base



Go Back
NSIS MDAC 2.7 detection
 
MDAC detection and download. Can be used within the client setup to auto detect if MDAC 2.7 or greater is installed. If not it auto downloads and installs MDAC 2.7.

NSIS Code:
Section MDAC SECMDAC

ClearErrors

   ReadRegStr $1 HKLM "SOFTWARE\Microsoft\DataAccess" "Version"

   IfErrors MDACNotFound MDACFound

   MDACFound:
      StrCpy $2 $1 3         ;e.g. $2 is now "2.5"

      StrCmp $2 "2.6" MDAC26Found
      StrCmp $2 "2.7" MDAC26Found
      StrCmp $2 "2.8" MDAC26Found
      StrCmp $2 "2.9" MDAC26Found
      StrCmp $2 "3.0" MDAC26Found
      Goto MDACNotFound

   MDAC26Found:
      Push 0
      Goto NextStep

   MDACNotFound:

MessageBox MB_YESNO|MB_ICONQUESTION "The Microsoft Data Access Components version 2.7 (or later) is required.$\nWould you like to download and install MDAC 2.7?" IDYES YesInstall IDNO NoAbort
NoAbort:
Abort
YesInstall:

DetailPrint "$(DESC_DOWNLOADINGM)..."
AddSize 286720
nsisdl::download /TRANSLATE "$(DESC_DOWNLOADINGM)" "$(DESC_CONNECTING)" \
       "$(DESC_SECOND)" "$(DESC_MINUTE)" "$(DESC_HOUR)" "$(DESC_PLURAL)" \
       "$(DESC_PROGRESS)" "$(DESC_REMAINING)" \
       /TIMEOUT=30000 "http://download.microsoft.com/download/3/b/f/3bf74b01-16ba-472d-9a8c-42b2b4fa0d76/mdac_typ.exe" "$TEMP\mdac_typ.exe"
   

Pop $0
    StrCmp "$0" "success" lbl_continue
    DetailPrint "$(DESC_DOWNLOADFAILED) $0"
    Abort
     lbl_continue:
      DetailPrint "$(DESC_INSTALLINGM) ..."
      Banner::show /NOUNLOAD "$(DESC_INSTALLINGM)..."
      nsExec::ExecToStack '"$TEMP\mdac_typ.exe" /q /C:"setup /QNT"'
      SetRebootFlag false
      Banner::destroy
Goto NextStep
NextStep:
SectionEnd


Go Back