123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624 |
-
-
-
-
-
-
-
-
-
- !define PRODUCT_NAME "Message Sniffer Server Installer"
-
- !define PRODUCT_VERSION "v3.3 - SNFv-E3.0.11"
- !define PRODUCT_PUBLISHER "Arm Research"
-
- SetCompressor lzma
- !include "WinMessages.nsh"
- !include "WordFunc.nsh"
-
-
- !include "Sections.nsh"
- !include "FileFunc.nsh"
- !include "nsDialogs.nsh"
- !include "LogicLib.nsh"
-
-
- !insertmacro WordFind
-
-
-
-
-
-
-
-
- VAR /GLOBAL isIceWarpInstalled
- VAR /GLOBAL isMailSiteInstalled
- VAR /GLOBAL isKerioInstalled
- VAR /GLOBAL isImailInstalled
- VAR /GLOBAL isSmarterMailInstalled
- VAR /GLOBAL isAlligateInstalled
- VAR /GLOBAL isDecludeInstalled
- VAR /GLOBAL isMXGuardInstalled
- VAR /GLOBAL isMINIMIInstalled
- VAR /GLOBAL isSNF4AlligateInstalled
- Var /GLOBAL isMDaemonInstalled
-
-
- VAR /GLOBAL Set_For_MINIMI_INSTALL
- VAR /GLOBAL Set_For_SNF4Alligate_INSTALL
-
- VAR /GLOBAL SelectedCaseIndexForPlatformScreen
-
-
-
-
- VAR /GLOBAL IceWarpInstallFolder
- VAR /GLOBAL MailSiteInstallFolder
- VAR /GLOBAL KerioInstallFolder
- VAR /GLOBAL ImailInstallFolder
- VAR /GLOBAL SmarterMailInstallFolder
- VAR /GLOBAL AlligateInstallFolder
- VAR /GLOBAL DecludeInstallFolder
- VAR /GLOBAL MXGuardInstallFolder
- VAR /GLOBAL MINIMIInstallFolder
- VAR /GLOBAL SNF4AlligateInstallFolder
- VAR /GLOBAL MDaemonInstallFolder
-
-
-
-
-
- Var /GLOBAL SNF_SearchFor_Location_Button
- Var /GLOBAL SNF_SearchFor_Location
- Var /GLOBAL SNF_SearchFor_Location_ButtonB
- Var /GLOBAL SNF_SearchFor_LocationB
-
- VAR /GLOBAL SNFServerInstallDir
- VAR /GLOBAL MessageSnifferRestoreDir
-
- VAR /GLOBAL PreviousSnifferInstalled
- VAR /GLOBAL ArchivesAvailable
- VAR /GLOBAL OldVersionOfSniffer
- VAR /GLOBAL ShowTelemetryPage
- VAR /GLOBAL ShowRestoreOptionsPage
-
- VAR /GLOBAL ShowArchiveOptionsPage
- VAR /GLOBAL HandleUninstallPage
-
-
- VAR /GLOBAL CustomFolderName
- VAR /GLOBAL LicenseID
- VAR /GLOBAL Authentication
-
- VAR /GLOBAL BaseRadioDefault
- VAR /GLOBAL currentPlatformSelection
- VAR /GLOBAL currentUtilitySelection
-
-
- Var /GLOBAL FindApplicationMessage
- Var /GLOBAL MissingApplicationName
- Var /GLOBAL MissingApplicationFolder
- Var /GLOBAL Find_Explanation_INFO
-
-
- Var /GLOBAL localINSTDIR
- Var /GLOBAL localSERVDIR
-
- PageEx components
- ComponentText "Welcome to the Message Sniffer Platforms Screen. $\nPlease select the platform you will use with Message Sniffer." " " "Please select from these available platforms:"
- PageCallbacks "setupPlatforms" "" ""
- PageExEnd
-
-
-
- Page custom "FindApplicationPath" "setupINSTALLDIR" "Confirm Install Location:"
-
-
-
-
-
- PageEx components
- ComponentText "Welcome to the Message Sniffer Server Install Utility. Please select from the available activities." " " "Please select from the available activities:"
- PageCallbacks "setupComponents2" "" "Components2_Leave"
- PageExEnd
-
-
- Page custom "nsDialogsTelemetryShow" "nsDialogsTelemetryLeave" "Status Viewer"
-
-
-
-
-
- Page custom nsDialogHandleUninstall "" "Uninstall"
-
- Page instfiles nsDialogInstall "" ""
-
- Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
-
-
- OutFile "SNF_CS_Installer.exe"
-
- ShowInstDetails show
-
- AddBrandingImage left 140
-
- !insertmacro GetParent
-
- !macro BIMAGE IMAGE PARMS
- Push $0
- GetTempFileName $0
- File /oname=$0 "${IMAGE}"
- SetBrandingImage ${PARMS} $0
- Delete $0
- Pop $0
- !macroend
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Var STR_REPLACE_VAR_0
- Var STR_REPLACE_VAR_1
- Var STR_REPLACE_VAR_2
- Var STR_REPLACE_VAR_3
- Var STR_REPLACE_VAR_4
- Var STR_REPLACE_VAR_5
- Var STR_REPLACE_VAR_6
- Var STR_REPLACE_VAR_7
- Var STR_REPLACE_VAR_8
-
- Function StrReplace
- Exch $STR_REPLACE_VAR_2
- Exch 1
- Exch $STR_REPLACE_VAR_1
- Exch 2
- Exch $STR_REPLACE_VAR_0
- StrCpy $STR_REPLACE_VAR_3 -1
- StrLen $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_1
- StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0
- loop:
- IntOp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_3 + 1
- StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_3
- StrCmp $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_1 found
- StrCmp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_6 done
- Goto loop
- found:
- StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_3
- IntOp $STR_REPLACE_VAR_8 $STR_REPLACE_VAR_3 + $STR_REPLACE_VAR_4
- StrCpy $STR_REPLACE_VAR_7 $STR_REPLACE_VAR_0 "" $STR_REPLACE_VAR_8
- StrCpy $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_5$STR_REPLACE_VAR_2$STR_REPLACE_VAR_7
- StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0
- Goto loop
- done:
- Pop $STR_REPLACE_VAR_1
- Pop $STR_REPLACE_VAR_1
- Exch $STR_REPLACE_VAR_0
- FunctionEnd
-
- Function un.StrReplace
- Exch $STR_REPLACE_VAR_2
- Exch 1
- Exch $STR_REPLACE_VAR_1
- Exch 2
- Exch $STR_REPLACE_VAR_0
- StrCpy $STR_REPLACE_VAR_3 -1
- StrLen $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_1
- StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0
- loop:
- IntOp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_3 + 1
- StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_3
- StrCmp $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_1 found
- StrCmp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_6 done
- Goto loop
- found:
- StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_3
- IntOp $STR_REPLACE_VAR_8 $STR_REPLACE_VAR_3 + $STR_REPLACE_VAR_4
- StrCpy $STR_REPLACE_VAR_7 $STR_REPLACE_VAR_0 "" $STR_REPLACE_VAR_8
- StrCpy $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_5$STR_REPLACE_VAR_2$STR_REPLACE_VAR_7
- StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0
- Goto loop
- done:
- Pop $STR_REPLACE_VAR_1
- Pop $STR_REPLACE_VAR_1
- Exch $STR_REPLACE_VAR_0
- FunctionEnd
-
- !macro _strReplaceConstructor OUT NEEDLE NEEDLE2 HAYSTACK
- Push "${HAYSTACK}"
- Push "${NEEDLE}"
- Push "${NEEDLE2}"
- Call StrReplace
- Pop "${OUT}"
- !macroend
-
- !macro un._strReplaceConstructor OUT NEEDLE NEEDLE2 HAYSTACK
- Push "${HAYSTACK}"
- Push "${NEEDLE}"
- Push "${NEEDLE2}"
- Call un.StrReplace
- Pop "${OUT}"
- !macroend
-
- !define StrReplace '!insertmacro "_strReplaceConstructor"'
- !define un.StrReplace '!insertmacro "un._strReplaceConstructor"'
-
- !macro ReplaceInFile SOURCE_FILE SEARCH_TEXT REPLACEMENT
- Push "${SOURCE_FILE}"
- Push "${SEARCH_TEXT}"
- Push "${REPLACEMENT}"
- Call RIF
- !macroend
-
- !macro un.ReplaceInFile SOURCE_FILE SEARCH_TEXT REPLACEMENT
- Push "${SOURCE_FILE}"
- Push "${SEARCH_TEXT}"
- Push "${REPLACEMENT}"
- Call un.RIF
- !macroend
-
- Function RIF
-
- ClearErrors
-
- Exch $0
- Exch
- Exch $1
- Exch 2
- Exch $2
-
- Push $R0
- Push $R1
- Push $R2
- Push $R3
- Push $R4
-
- IfFileExists $2 +1 RIF_error
- FileOpen $R0 $2 "r"
-
- GetTempFileName $R2
- FileOpen $R1 $R2 "w"
-
- RIF_loop:
- FileRead $R0 $R3
- IfErrors RIF_leaveloop
- RIF_sar:
- Push "$R3"
- Push "$1"
- Push "$0"
- Call StrReplace
- StrCpy $R4 "$R3"
- Pop $R3
- StrCmp "$R3" "$R4" +1 RIF_sar
- FileWrite $R1 "$R3"
- Goto RIF_loop
-
- RIF_leaveloop:
- FileClose $R1
- FileClose $R0
-
- Delete "$2.old"
-
- Rename "$2" "$2.old"
-
- Rename "$R2" "$2"
-
- Delete "$2.old"
- ClearErrors
- Goto RIF_out
-
- RIF_error:
- SetErrors
-
- RIF_out:
- Pop $R4
- Pop $R3
- Pop $R2
- Pop $R1
- Pop $R0
- Pop $2
- Pop $0
- Pop $1
-
- FunctionEnd
-
- Function un.RIF
-
- ClearErrors
-
- Exch $0
- Exch
- Exch $1
- Exch 2
- Exch $2
-
- Push $R0
- Push $R1
- Push $R2
- Push $R3
- Push $R4
-
- IfFileExists $2 +1 RIF_error
- FileOpen $R0 $2 "r"
-
- GetTempFileName $R2
- FileOpen $R1 $R2 "w"
-
- RIF_loop:
- FileRead $R0 $R3
- IfErrors RIF_leaveloop
- RIF_sar:
- Push "$R3"
- Push "$1"
- Push "$0"
- Call un.StrReplace
- StrCpy $R4 "$R3"
- Pop $R3
- StrCmp "$R3" "$R4" +1 RIF_sar
- FileWrite $R1 "$R3"
- Goto RIF_loop
-
- RIF_leaveloop:
- FileClose $R1
- FileClose $R0
-
- Delete "$2.old"
-
- Rename "$2" "$2.old"
-
- Rename "$R2" "$2"
-
- Delete "$2.old"
- ClearErrors
- Goto RIF_out
-
- RIF_error:
- SetErrors
-
- RIF_out:
- Pop $R4
- Pop $R3
- Pop $R2
- Pop $R1
- Pop $R0
- Pop $2
- Pop $0
- Pop $1
-
- FunctionEnd
-
-
-
-
-
- !macro GetBetween This AndThis In Return
- Push "${This}"
- Push "${AndThis}"
- Push "${In}"
- Call GetBetween
- Pop "${Return}"
- !macroend
- !define GetBetween "!insertmacro GetBetween"
-
- Function GetBetween
- Exch $R0
- Exch
- Exch $R1
- Exch 2
- Exch $R2
- Exch 2
- Exch
- Exch 2
- Push $R3
- Push $R4
- Push $R5
- Push $R6
- Push $R7
- Push $R8
-
-
- FileOpen $R6 $R0 r
-
- StrLen $R4 $R2
- StrLen $R3 $R1
-
- StrCpy $R0 ""
-
- Read1:
- ClearErrors
- FileRead $R6 $R7
- IfErrors Done
- StrCpy $R5 0
-
- FindMarker1:
- IntOp $R5 $R5 - 1
- StrCpy $R8 $R7 $R4 $R5
- StrCmp $R8 "" Read1
- StrCmp $R8 $R2 0 FindMarker1
- IntOp $R5 $R5 + $R4
- StrCpy $R7 $R7 "" $R5
-
- StrCpy $R5 -1
- Goto FindMarker2
-
- Read2:
- ClearErrors
- FileRead $R6 $R7
- IfErrors Done
- StrCpy $R5 -1
-
- FindMarker2:
- IntOp $R5 $R5 + 1
- StrCpy $R8 $R7 $R3 $R5
- StrCmp $R8 "" 0 +3
- StrCpy $R0 $R0$R7
- Goto Read2
- StrCmp $R8 $R1 0 FindMarker2
- StrCpy $R7 $R7 $R5
- StrCpy $R0 $R0$R7
-
- Done:
- FileClose $R6
-
- Pop $R8
- Pop $R7
- Pop $R6
- Pop $R5
- Pop $R4
- Pop $R3
- Pop $R2
- Pop $R1
- Exch $R0
- FunctionEnd
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Function RelGotoPage
- IntCmp $R9 0 0 Move Move
- StrCmp $R9 "X" 0 Move
- StrCpy $R9 "120"
-
- Move:
- SendMessage $HWNDPARENT "0x408" "$R9" ""
- FunctionEnd
-
-
-
-
-
-
-
-
-
-
- Function DetermineMDaemon
-
-
- StrCpy $isMDaemonInstalled "0"
-
- ReadRegStr $MDaemonInstallFolder HKLM "SOFTWARE\Alt-N Technologies\MDaemon" "AppPath"
- StrCmp $MDaemonInstallFolder "" ReportFalse 0
- StrCpy $isMDaemonInstalled "1"
-
- ${GetParent} $MDaemonInstallFolder $MDaemonInstallFolder
-
- ifFileExists "$MDaemonInstallFolder\App\*.*" 0 ReportFalse
- ifFileExists "$MDaemonInstallFolder\SpamAssassin\rules\*.*" 0 ReportFalse
-
- StrCpy $isMDaemonInstalled "1"
- ReportFalse:
- Return
- FunctionEnd
-
-
- Function DetermineIceWarp
-
- StrCpy $isIceWarpInstalled "0"
-
- ReadRegStr $IceWarpInstallFolder HKLM "SOFTWARE\IceWarp\Merak Mail Server" "InstallDir"
- StrCpy $IceWarpInstallFolder $IceWarpInstallFolder -1
- StrCmp $IceWarpInstallFolder "" ReportFalse 0
- StrCpy $isIceWarpInstalled "1"
-
-
- ifFileExists "$IceWarpInstallFolder\config\*.*" 0 skipFilecreation
- ifFileExists "$IceWarpInstallFolder\config\content.xml" skipFilecreation 0
- Var /GLOBAL tempFileHandle
- FileOpen $tempFileHandle "$IceWarpInstallFolder\config\content.xml" w
- FileClose $tempFileHandle
- skipFileCreation:
- ReportFalse:
- Return
- FunctionEnd
-
- Function DetermineSNF4Alligate
-
- StrCmp $isAlligateInstalled "0" ReportFalse 0
-
-
-
- Var /GLOBAL FilterEXE
- ReadRegStr $FilterEXE HKLM "SOFTWARE\SolidOak\Alligate\Settings" "FilterEXE"
- Var /GLOBAL SNF4AWordCount
- StrCmp $FilterEXE "" ReportFalse 0
- ${WordFind} $FilterEXE "SNF4Alligate" "E*" $SNF4AWordCount
- iferrors ReportFalse 0
- ${IF} $SNF4AWordCount > "0"
-
-
- StrCpy $isSNF4AlligateInstalled "1"
- ${endif}
-
-
- ReadRegStr $SNF4AlligateInstallFolder HKLM "SOFTWARE\SolidOak\Alligate\Settings" "InstallDir"
- StrCpy $SNF4AlligateInstallFolder $SNF4AlligateInstallFolder -1
- Return
- ReportFalse:
- StrCpy $isSNF4AlligateInstalled "0"
- StrCpy $SNF4AlligateInstallFolder ""
- FunctionEnd
-
- Function DetermineMINIMI
-
- StrCmp $isIMailInstalled "0" ReportFalse 0
-
-
-
- Var /GLOBAL SendNameValue
- ReadRegStr $SendNameValue HKLM "SOFTWARE\Ipswitch\IMail\Global" "SendName"
- Var /GLOBAL WordCount
- StrCmp $SendNameValue "" ReportFalse 0
- ${WordFind} $SendNameValue "SNFIMailShim.exe" "E*" $WordCount
- iferrors ReportFalse 0
- ${IF} $WordCount > "0"
-
-
- StrCpy $isMINIMIInstalled "1"
- ${endif}
- ReportFalse:
-
- ReadRegStr $MINIMIInstallFolder HKLM "SOFTWARE\Ipswitch\IMail\Global" "TopDir"
-
- Return
- FunctionEnd
-
-
-
-
-
-
-
-
- Function SetInstallForSNF4Alligate
-
-
-
-
- Var /GLOBAL WAS_SNF4AlligateInstalledAlready
- ReadRegStr $WAS_SNF4AlligateInstalledAlready HKLM "Software\MessageSniffer" "isSNF4AlligateInstalled"
- iferrors Install_SNF4Alligate
- StrCmp $WAS_SNF4AlligateInstalledAlready "1" 0 Install_SNF4Alligate
- MessageBox MB_OKCANCEL "A previous installation of SNF4Alligate was detected. Select OK to reinstall or CANCEL to work with the existing version?" IDOK Install_SNF4Alligate IDCANCEL SkipInstall
- Install_SNF4Alligate:
- StrCpy $Set_For_SNF4Alligate_INSTALL "1"
-
- Return
- SkipInstall:
- StrCpy $Set_For_SNF4Alligate_INSTALL "0"
- Return
- FunctionEnd
-
-
-
-
-
-
- Function installSNF4Alligate
-
-
-
- StrCmp $isAlligateInstalled "0" ReportFalse 0
-
-
-
-
- Var /GLOBAL LocalKeyhandle
- Var /GLOBAL defaultHoldValue
- Var /GLOBAL defaultDeliveryValue
-
- nsExec::Exec 'NET STOP "Alligate SMTP Service"' '' SH_HIDE
-
-
-
-
-
- ReadRegStr $LocalKeyhandle HKLM "SOFTWARE\SolidOak\Alligate\Settings" "InstallDir"
- StrCmp $LocalKeyhandle "" ReportFalse 0
-
-
-
- StrCpy $LocalKeyhandle $LocalKeyhandle -1
-
- IfFileExists "$LocalKeyhandle\AGFiltSvc.exe" +2 0
- MessageBox MB_OK "Can't find AGFiltSvc.exe in ImAlligate's root directory: $LocalKeyhandle. SNF4Alligate's xml config file will need manual file correction and you will need to install and start Alligates AGFiltSvc manually."
-
- StrCpy $SNF4AlligateInstallFolder $LocalKeyhandle
- SetOutPath $SNF4AlligateInstallFolder
-
- IfFileExists "$SNF4AlligateInstallFolder\SNF4Alligate.exe" 0 +2
- Rename "$SNF4AlligateInstallFolder\SNF4Alligate.exe" "$SNF4AlligateInstallFolder\OLD_SNF4Alligate.exe"
- File "SNF4Alligate.exe"
-
-
- IfFileExists "$LocalKeyhandle\Hold\*.*" +2 0
- CreateDirectory "$LocalKeyhandle\Hold"
-
-
- IfFileExists "$SNF4AlligateInstallFolder\SNF4Alligate.xml" UseExistingXML 0
-
-
-
- File "SNF4Alligate.xml"
-
- UseExistingXML:
-
-
-
- WriteRegStr HKLM "SOFTWARE\SolidOak\Alligate\Settings" "DropDir" "$SNF4AlligateInstallFolder\Drop"
-
-
- WriteRegStr HKLM SOFTWARE\SolidOak\Alligate\Settings\Addins\MsgSniffer\ "ProcessDirHint" "Sniffer"
- WriteRegStr HKLM SOFTWARE\SolidOak\Alligate\Settings\Addins\MsgSniffer\ "ProcessDir" "$SNF4AlligateInstallFolder\Drop"
- WriteRegStr HKLM SOFTWARE\SolidOak\Alligate\Settings\Addins\MsgSniffer\ "ProcessDirLabel" "If you are using the Routing table feature to expressly define processing directories then you will need to manually set the folders you want Sniffer to scan, to process messages in the \Drop\ folder."
-
-
- ReadRegStr $LocalKeyhandle HKLM "SOFTWARE\SolidOak\Alligate\Settings" "FilterEXE"
-
-
-
- ${WordFind} $LocalKeyhandle "SNF4Alligate.exe" "E*" $WordCount
- iferrors NoSNFIPRESENT_OK SKIP_INCHAIN_DELIVERY_ALTERAION
-
-
- NoSNFIPRESENT_OK:
- StrCmp $LocalKeyhandle "" 0 SkipCreatingFilterExe
- WriteRegStr HKLM "SOFTWARE\SolidOak\Alligate\Settings" "FilterEXE" "SNF4Alligate.exe"
- WriteRegDWORD HKLM "SOFTWARE\SolidOak\Alligate\Settings" "FilterThreads" "20"
- SkipCreatingFilterExe:
-
- StrCmp $LocalKeyhandle "" +2 0
- NoSMTP32: MessageBox MB_OK "Alligate is currently delivering its messages to: $LocalKeyHandle $\r$\n SNF4Alligate will insert itself ahead of that call, and send valid messages to its custom handler upon completion."
-
-
-
-
- ${GetBetween} "<delivery program='" "'/>$\r$\n" "$SNF4AlligateInstallFolder\SNF4Alligate.xml" "$defaultDeliveryValue"
-
-
-
- StrCmp $LocalKeyhandle "" 0 ReplaceWithValue
- !insertmacro ReplaceInFile "$SNF4AlligateInstallFolder\SNF4Alligate.xml" "<delivery program='$defaultDeliveryValue'/>$\r$\n" "<delivery program='none'/>$\r$\n"
- Goto NextTest
- ReplaceWithValue:
- !insertmacro ReplaceInFile "$SNF4AlligateInstallFolder\SNF4Alligate.xml" "<delivery program='$defaultDeliveryValue'/>$\r$\n" "<delivery program='$LocalKeyhandle'/>$\r$\n"
- NextTest:
- ClearErrors
-
- ${GetBetween} "<hold path='" "'/>" "$SNF4AlligateInstallFolder\SNF4Alligate.xml" "$defaultHoldValue"
- StrCmp $defaultHoldValue "$LocalKeyhandle\Hold\" NextTest2 0
- !insertmacro ReplaceInFile "$SNF4AlligateInstallFolder\SNF4Alligate.xml" "<hold path='$defaultHoldValue'/>" "<hold path='$LocalKeyhandle\Hold\'/>"
- NextTest2: ClearErrors
-
-
- SKIP_INCHAIN_DELIVERY_ALTERAION:
- ExecWait "$SNF4AlligateInstallFolder\AGFiltSvc.exe /install"
-
- iferrors WeMustUndo 0
-
-
-
- Done:
- SetOutPath $INSTDIR
- WriteRegStr HKLM "Software\MessageSniffer" "isSNF4AlligateInstalled" "1"
- WriteRegStr HKLM "Software\MessageSniffer" "SNF4AlligateInstallFolder" "$SNF4AlligateInstallFolder"
-
- StrCpy $isSNF4AlligateInstalled "1"
- nsExec::Exec 'NET START AgSMTPSvc' '' SH_HIDE
- nsExec::Exec 'NET START AGFiltSvc' '' SH_HIDE
- return
-
- ReportFalse: MessageBox MB_OK "Unable to find valid Alligate InstallDir from the registry. SNF4Alligate Install was aborted."
- nsExec::Exec 'NET START AgSMTPSvc' '' SH_HIDE
- Return
-
- WeMustUndo:
- MessageBox MB_OKCANCEL "Failed Attempt. Clean Up?$\r$\nDetails: SNF4Alligate install script was unable to write to the Alligate FilterEXE registry key. ( To instert SNF4Alligate into the message control stream. ) Click OK if you want the installer to remove and restore the intallation attempt? ( Cancel if you want to leave the two SNF4Aligate files. i.e. You might want to try to tie in SNF4Alligate through Alligate's Administration screens? )" IDOK cleanupFiles IDCANCEL leaveFiles
- nsExec::Exec 'NET START AgSMTPSvc' '' SH_HIDE
- cleanupFiles:
-
- ifFileExists "$SNF4AlligateInstallFolder\SNF4AlligateNEW.xml" 0 +2
- Delete "$SNF4AlligateInstallFolder\SNF4AlligateNEW.xml"
- ifFileExists "$SNF4AlligateInstallFolder\OLD_SNF4Alligate.xml" 0 +2
- Delete "$SNF4AlligateInstallFolder\OLD_SNF4Alligate.xml"
- ifFileExists "$SNF4AlligateInstallFolder\OLD_SNF4Alligate.exe" 0 +2
- Delete "$SNF4AlligateInstallFolder\OLD_SNF4Alligate.exe"
- ifFileExists "$SNF4AlligateInstallFolder\SNF4Aligate.xml" 0 +2
- Delete "$SNF4AlligateInstallFolder\SNF4Alligate.xml"
- ifFileExists "$SNF4AlligateInstallFolder\SNF4Alligate.exe" 0 +2
- Delete "$SNF4AlligateInstallFolder\SNF4Alligate.exe"
- leaveFiles:
- return
- FunctionEnd
-
- Function SetInstallForMINIMI
-
-
-
-
- Var /GLOBAL WAS_MINIMIInstalledAlready
- ReadRegStr $WAS_MINIMIInstalledAlready HKLM "Software\MessageSniffer" "isMINIMIInstalled"
- iferrors Install_MINIMI
- StrCmp $WAS_MINIMIInstalledAlready "1" 0 Install_MINIMI
- MessageBox MB_OKCANCEL "A previous installation of MINIMI was detected. Select OK to reinstall or CANCEL to work with the existing version?" IDOK Install_MINIMI IDCANCEL SkipInstall
- Install_MINIMI:
- StrCpy $Set_For_MINIMI_INSTALL "1"
-
- Return
- SkipInstall:
- StrCpy $Set_For_MINIMI_INSTALL "0"
- Return
- FunctionEnd
-
-
-
- Function installMINIMI
-
-
-
- StrCmp $isIMailInstalled "0" ReportFalse 0
-
-
-
-
-
-
-
-
-
-
-
-
- ReadRegStr $LocalKeyhandle HKLM "SOFTWARE\Ipswitch\IMail\Global" "TopDir"
- StrCmp $LocalKeyhandle "" ReportFalse 0
-
- IfFileExists "$LocalKeyhandle\SMTP32.exe" +2 0
- MessageBox MB_OK "Can't find SMTP32.exe in Imail's root directory: $LocalKeyhandle. MINIMI's xml config file will need manual file correction."
-
- StrCpy $MINIMIInstallFolder $LocalKeyhandle
- SetOutPath $MINIMIInstallFolder
-
- IfFileExists "$MINIMIInstallFolder\SNFIMailShim.exe" 0 +2
- Rename "$MINIMIInstallFolder\SNFIMailShim.exe" "$MINIMIInstallFolder\OLD_SNFIMailShim.exe"
- File "SNFIMailShim.exe"
- File "MIMIMIreadme.txt"
-
-
-
- IfFileExists "$MINIMIInstallFolder\SNFIMailShim.xml" UseExistingXML 0
-
-
-
- File "SNFIMailShim.xml"
-
-
- UseExistingXML:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ReadRegStr $LocalKeyhandle HKLM "SOFTWARE\Ipswitch\IMail\Global" "SendName"
-
- ${WordFind} $LocalKeyhandle "SNFIMailShim.exe" "E*" $WordCount
- iferrors NoSNFIPRESENT_OK SKIP_INCHAIN_DELIVERY_ALTERAION
-
-
- NoSNFIPRESENT_OK:
- ${WordFind} $LocalKeyhandle "SMTP32.exe" "E*" $WordCount
- iferrors NoSMTP32 0
- StrCmp $WordCount "0" 0 +2
-
- NoSMTP32: MessageBox MB_OK "IMail is currently delivering its messages to: $LocalKeyHandle $\r$\n MINIMI will insert itself ahead of that call, and send valid messages to its custom handler upon completion."
-
-
- ${GetBetween} "<delivery program='" "'/>$\r$\n" "$MINIMIInstallFolder\SNFIMailShim.xml" "$defaultDeliveryValue"
- StrCmp $defaultDeliveryValue $LocalKeyhandle NextTest 0
- !insertmacro ReplaceInFile "$MINIMIInstallFolder\SNFIMailShim.xml" "<delivery program='$defaultDeliveryValue'/>$\r$\n" "<delivery program='$LocalKeyhandle'/>$\r$\n"
- NextTest: ClearErrors
-
-
- ReadRegStr $LocalKeyhandle HKLM "SOFTWARE\Ipswitch\IMail\Global" "SpoolDir"
-
- IfFileExists "$LocalKeyhandle\spam\*.*" +2 0
- CreateDirectory "$LocalKeyhandle\spam"
-
-
- ${GetBetween} "<hold path='" "\spam\'/>$\r$\n" "$MINIMIInstallFolder\SNFIMailShim.xml" "$defaultHoldValue"
- StrCmp $defaultHoldValue $LocalKeyhandle NextTest2 0
- !insertmacro ReplaceInFile "$MINIMIInstallFolder\SNFIMailShim.xml" "<hold path='$defaultHoldValue\spam\'/>$\r$\n" "<hold path='$LocalKeyhandle\spam\'/>$\r$\n"
- NextTest2: ClearErrors
-
-
- SKIP_INCHAIN_DELIVERY_ALTERAION:
- WriteRegStr HKLM "SOFTWARE\Ipswitch\IMail\Global" "SendName" "$MINIMIInstallFolder\SNFIMailShim.exe"
-
- iferrors WeMustUndo 0
-
-
-
- Done:
- SetOutPath $INSTDIR
- WriteRegStr HKLM "Software\MessageSniffer" "isMINIMIInstalled" "1"
- WriteRegStr HKLM "Software\MessageSniffer" "MINIMIInstallFolder" "$MINIMIInstallFolder"
-
- StrCpy $isMINIMIInstalled "1"
- return
-
- ReportFalse: MessageBox MB_OK "Unable to find valid IMail TopDirector from the registry. MINIMI Install was aborted."
- Return
-
- WeMustUndo:
- MessageBox MB_OKCANCEL "Failed Attempt. Clean Up?$\r$\nDetails: MINIMI Install script was unable to write to the IMail SendName registry key. ( To instert MINIMI into the message control stream. ) Click OK if you want the installer to remove and restore the intallation attempt? ( Cancel if you want to leave the three MINIMI files. i.e. You might want to try to tie in MINIMI through Imails Administration screens? )" IDOK cleanupFiles IDCANCEL leaveFiles
-
- cleanupFiles:
-
- ifFileExists "$MINIMIInstallFolder\SNFIMailShimNEW.xml" 0 +2
- Delete "$MINIMIInstallFolder\SNFIMailShimNEW.xml"
- ifFileExists "$MINIMIInstallFolder\OLD_SNFIMailShim.xml" 0 +2
- Delete "$MINIMIInstallFolder\OLD_SNFIMailShim.xml"
- ifFileExists "$MINIMIInstallFolder\OLD_SNFIMailShim.exe" 0 +2
- Delete "$MINIMIInstallFolder\OLD_SNFIMailShim.exe"
- ifFileExists "$MINIMIInstallFolder\SNFIMailShim.xml" 0 +2
- Delete "$MINIMIInstallFolder\SNFIMailShim.xml"
- ifFileExists "$MINIMIInstallFolder\SNFIMailShim.exe" 0 +2
- Delete "$MINIMIInstallFolder\SNFIMailShim.exe"
- ifFileExists "$MINIMIInstallFolder\MIMIMIreadme.txt" 0 +2
- Delete "$MINIMIInstallFolder\MIMIMIreadme.txt"
- leaveFiles:
- return
- FunctionEnd
-
-
- Function DetermineMXGuard
-
-
-
-
-
-
- StrCpy $isMXGuardInstalled "0"
-
-
- Var /GLOBAL MXPathVar
- Var /GLOBAl testVar
- StrCmp $isIMailInstalled "1" 0 TestSmarterMail
-
- ReadRegStr $MXPathVar HKLM "SOFTWARE\Ipswitch\IMail\Global" "SendName"
- StrCmp $MXPathVar "" ReportFalse 0
- ${WordFind} $MXPathVar "imailtomxguard.exe" "E*" $R0
- iferrors ReportFalse 0
- ${IF} $R0 > "0"
-
-
- StrCpy $isMXGuardInstalled "1"
- ${GetParent} $MXPathVar $MXGuardInstallFolder
- ${endif}
- Return
- TestSmarterMail:
- StrCmp $isSmarterMailInstalled "1" 0 ReportFalse
- ifFileExists "C:\Program Files\dgSoft Internet Services\mxGuard for Mail Servers\mxGuard.xml" 0 Try4Pt2
-
- ${GetBetween} "<type>" "</type>" "C:\Program Files\dgSoft Internet Services\mxGuard for Mail Servers\mxGuard.xml" "$testVar"
- StrCmp $testVar "SmarterMail" 0 ReportFalse
- StrCpy $isMXGuardInstalled "1"
- StrCpy $MXGuardInstallFolder "C:\Program Files\dgSoft Internet Services\mxGuard for Mail Servers"
- Try4Pt2:
- ifFileExists "C:\Program Files\dgSoft Internet Services\mxGuard for Mail Servers v4.2\mxGuard.xml" 0 ReportFalse
-
- ${GetBetween} "<type>" "</type>" "C:\Program Files\dgSoft Internet Services\mxGuard for Mail Servers v4.2\mxGuard.xml" "$testVar"
- StrCmp $testVar "SmarterMail" 0 ReportFalse
- StrCpy $isMXGuardInstalled "1"
- StrCpy $MXGuardInstallFolder "C:\Program Files\dgSoft Internet Services\mxGuard for Mail Servers v4.2"
-
- ReportFalse:
- Return
- FunctionEnd
-
- Function SetInstallForMXGuard
-
-
-
-
-
-
-
- FunctionEnd
-
-
- Function DetermineDeclude
-
-
-
-
-
- StrCpy $isDecludeInstalled "0"
- StrCpy $DecludeInstallFolder = ""
-
-
-
-
- ReadRegStr $DecludeInstallFolder HKLM "SOFTWARE\ComputerizedHorizons" "RootMailPath"
- StrCmp $DecludeInstallFolder "" ReportBad 0
- IfFileExists "$DecludeInstallFolderdeclude" 0 ReportBad
- StrCpy $isDecludeInstalled "1"
- Return
- ReportBad:
- StrCpy $isDecludeInstalled "0"
-
- Return
-
-
-
-
- FunctionEnd
-
- Function SetInstallForDeclude
-
- StrCpy $1 $DecludeInstallFolder "" -1
- StrCmp $1 "\" 0 JustCopy
- StrCpy $DecludeInstallFolder $DecludeInstallFolder -1
- JustCopy:
- StrCpy $SNFServerInstallDir "$DecludeInstallFolder\declude"
- StrCpy $INSTDIR "$SNFServerInstallDir\SNF"
- FunctionEnd
-
-
-
-
- Function DetermineAlligate
- StrCpy $isAlligateInstalled "0"
- StrCpy $AlligateInstallFolder = ""
-
- ReadRegStr $AlligateInstallFolder HKLM "SOFTWARE\SolidOak\Alligate\Settings" "InstallDir"
- StrCpy $AlligateInstallFolder $AlligateInstallFolder -1
-
- StrCmp $AlligateInstallFolder "" ReportBad 0
- StrCpy $isAlligateInstalled "1"
- Return
- ReportBad:
- StrCpy $isAlligateInstalled "0"
- Return
- Return
- FunctionEnd
-
- Function DetermineSmarterMail
-
-
-
-
-
-
-
- StrCpy $isSmarterMailInstalled "0"
- StrCpy $SmarterMailInstallFolder = ""
-
- ReadRegStr $SmarterMailInstallFolder HKLM "SOFTWARE\SmarterTools\SmarterMail" "InstallPath"
-
- StrCmp $SmarterMailInstallFolder "" ReportBad 0
- StrCpy $isSmarterMailInstalled "1"
- Return
- ReportBad:
- StrCpy $isSmarterMailInstalled "0"
- Return
-
-
-
- return
- FunctionEnd
-
- Function DetermineImail
-
- StrCpy $isIMailInstalled "0"
- StrCpy $IMailInstallFolder = ""
-
- ReadRegStr $IMailInstallFolder HKLM "SOFTWARE\Ipswitch\Imail\Global" "TopDir"
- StrCmp $IMailInstallFolder "" ReportBad 0
- IfFileExists $IMailInstallFolder 0 ReportBad
-
- StrCpy $isIMailInstalled "1"
- Return
- ReportBad:
- StrCpy $isIMailInstalled "0"
- Return
-
- FunctionEnd
-
- Function DetermineInstallationPlatforms
- Call InitPlatformFlags
-
-
-
-
-
-
-
-
- Call DetermineIMail
- Call DetermineSmarterMail
- Call DetermineAlligate
-
-
- Call DetermineDeclude
- Call DetermineMXGuard
- Call DetermineMINIMI
- Call DetermineMDaemon
-
- FunctionEnd
-
- Function UninstallXYNTService
-
- nsExec::Exec "NET STOP SNFService" "" SH_HIDE
- ifFileExists "$SNFServerInstallDir\SNF\XYNTService.exe" 0 +2
- nsExec::Exec "$SNFServerInstallDir\SNF\XYNTService -u" "" SH_HIDE
- ifFileExists "$SNFServerInstallDir\Sniffer\XYNTService.exe" 0 +2
- nsExec::Exec "$SNFServerInstallDir\Sniffer\XYNTService -u" "" SH_HIDE
- return
-
- FunctionEnd
-
- Function checkTelemetry
-
- ${GetBetween} "licenseid='" "'" "$INSTDIR\identity.xml" $LicenseID
- ${GetBetween} "authentication='" "'" "$INSTDIR\identity.xml" $Authentication
-
-
-
- nsExec::Exec /TIMEOUT=700 '"$INSTDIR\snf2check.exe" "$INSTDIR\$LicenseID.snf" "$Authentication"' SH_HIDE
- pop $0
- ${If} $0 = "0"
- Detailprint " The Rulebase passes the snf2check.exe authentication."
- ${Else}
- Detailprint " Snf2check fails: "
- ${Switch} $0
- ${Case} "0"
- DetailPrint " SNFClient successfuly connected with SNFServer."
- Goto EndSNF2CheckTest
- ${Case} "65"
- DetailPrint " {65} ERROR_CMDLINE. SNF was called improperly."
- Goto EndSNF2CheckTest
- ${Case} "66"
- DetailPrint " {66}ERROR_LOGFILE Cannot open logfile."
- Goto EndSNF2CheckTest
- ${Case} "67"
- DetailPrint " {67} ERROR RULE FILE. Cannot open rules file."
- Goto EndSNF2CheckTest
- ${Case} "68"
- DetailPrint " {68} ERROR_RULE_DATA Cannot create pattern matrix."
- Goto EndSNF2CheckTest
- ${Case} "69"
- DetailPrint " {69} ERROR_MSG_FILE Cannot open message file."
- Goto EndSNF2CheckTest
- ${Case} "70"
- DetailPrint " {70} ERROR_ALLOCATION Allocation error during processing."
- Goto EndSNF2CheckTest
- ${Case} "71"
- DetailPrint " {71} ERROR_BAD_MATRIX Pattern trace went out of range."
- Goto EndSNF2CheckTest
- ${Case} "72"
- DetailPrint " {72} ERROR_MAX_EVALS The maximum number of evaluation paths was exceeded."
- Goto EndSNF2CheckTest
- ${Case} "73"
- DetailPrint " {73} ERROR_RULE_AUTH The rulebase file did not authenticate properly."
- Goto EndSNF2CheckTest
- ${Case} "99"
- DetailPrint " {99} ERROR_UNKNOWN"
- Goto EndSNF2CheckTest
- ${EndSwitch}
- EndSNF2CheckTest:
- ${EndIF}
-
- ifFileExists "$SNFServerInstallDir\App\MDaemon.exe" 0 +3
- Detailprint "MDaemon Install system check complete."
- return
-
-
- DetailPrint "Checking SNFService:"
- nsExec::Exec /TIMEOUT=700 "NET START SNFService" SH_HIDE
- pop $0
- ${Switch} $0
- ${Case} "0"
- DetailPrint " SNFService was started."
- Goto EndSNFServiceTest
- ${Case} "1"
- DetailPrint " SNFService was not supported."
- Goto EndSNFServiceTest
- ${Case} "2"
- DetailPrint " SNFService is running."
- Goto EndSNFServiceTest
- ${Case} "8"
- DetailPrint " Unknown failure starting SNFService."
- Goto EndSNFServiceTest
- ${Case} "10"
- DetailPrint " Installer has verified that SNFService is running."
- Goto EndSNFServiceTest
- ${EndSwitch}
- EndSNFServiceTest:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sleep 3000
- DetailPrint "Waiting for SNFServer to spin up."
-
-
- nsExec::Exec /TIMEOUT=700 '$INSTDIR\SNFClient.exe -status.second' SH_HIDE
- pop $0
-
- ${Switch} $0
- ${Case} "0"
- DetailPrint " SNFClient successfuly connected with SNFServer."
- Goto EndSNFClientTest
- ${Case} "65"
- DetailPrint " {65} ERROR_CMDLINE. SNF was called improperly."
- Goto EndSNFClientTest
- ${Case} "66"
- DetailPrint " {66}ERROR_LOGFILE Cannot open logfile."
- Goto EndSNFClientTest
- ${Case} "67"
- DetailPrint " {67} ERROR RULE FILE. Cannot open rules file."
- Goto EndSNFClientTest
- ${Case} "68"
- DetailPrint " {68} ERROR_RULE_DATA Cannot create pattern matrix."
- Goto EndSNFClientTest
- ${Case} "69"
- DetailPrint " {69} ERROR_MSG_FILE Cannot open message file."
- Goto EndSNFClientTest
- ${Case} "70"
- DetailPrint " {70} ERROR_ALLOCATION Allocation error during processing."
- Goto EndSNFClientTest
- ${Case} "71"
- DetailPrint " {71} ERROR_BAD_MATRIX Pattern trace went out of range."
- Goto EndSNFClientTest
- ${Case} "72"
- DetailPrint " {72} ERROR_MAX_EVALS The maximum number of evaluation paths was exceeded."
- Goto EndSNFClientTest
- ${Case} "73"
- DetailPrint " {73} ERROR_RULE_AUTH The rulebase file did not authenticate properly."
- Goto EndSNFClientTest
- ${Case} "99"
- DetailPrint " {99} ERROR_UNKNOWN"
- Goto EndSNFClientTest
- ${EndSwitch}
- EndSNFClientTest:
-
- Detailprint "System test complete."
- Return
-
- FunctionEnd
-
-
-
- Section /o "New Install" g1o1
-
-
- Call UninstallXYNTService
-
-
- Call OutputLocalRootInfoFile
-
-
-
-
- StrCmp $isMDaemonInstalled "1" 0 TestNextHandle1
- ifFileExists "$MDaemonInstallFolder\App\MDaemon.exe" 0 TestNextHandle1
- nsExec::Exec 'NET STOP MDAEMON' "" SH_HIDE
- Sleep 1000
-
-
- TestNextHandle1:
-
- StrCmp $isSNF4AlligateInstalled "1" 0 Handlenext1
- nsExec::Exec 'net stop AgSMTPSvc' "" SH_HIDE
- Sleep 1000
- Handlenext1:
-
- StrCmp $isMINIMIInstalled "1" 0 TestNext1
- nsExec::Exec 'NET STOP "IMail SMTP Server"' "" SH_HIDE
- Sleep 1000
- Testnext1:
-
- StrCmp $isDecludeInstalled "1" 0 +2
- nsExec::Exec "NET STOP Decludeproc" "" SH_HIDE
-
-
-
- SetOutPath $INSTDIR
- File "Restorer.exe"
- ExecWait "$INSTDIR\Restorer.exe -F"
-
- StrCmp $isMDaemonInstalled "1" 0 TestNextHandle
- nsExec::Exec 'NET STOP MDAEMON' "" SH_HIDE
- Sleep 3000
- nsExec::Exec 'net start MDAEMON' "" SH_HIDE
- Sleep 1000
- TestNextHandle:
-
- StrCmp $isSNF4AlligateInstalled "1" 0 Handlenext
- nsExec::Exec 'net stop AgSMTPSvc' "" SH_HIDE
- Sleep 1000
- nsExec::Exec '"$SNF4AlligateInstallFolder\AGFiltSvc.exe" /start'
- Sleep 1000
- nsExec::Exec 'net start AgSMTPSvc' "" SH_HIDE
- Sleep 1000
- Handlenext:
-
- StrCmp $isMINIMIInstalled "1" 0 TestNext
- nsExec::Exec 'NET STOP "IMail SMTP Server"' "" SH_HIDE
- Sleep 1000
- nsExec::Exec 'NET START "IMail SMTP Server"' "" SH_HIDE
- Sleep 1000
- Testnext:
-
- StrCmp $isDecludeInstalled "1" 0 ThenQuit
- nsExec::Exec "NET STOP Decludeproc" "" SH_HIDE
- Sleep 1000
- nsExec::Exec "NET START Decludeproc" "" SH_HIDE
-
- ThenQuit:
- call checkTelemetry
- return
- SectionEnd
-
- Section /o "Install Fresh (Discard local configuration.)" g1o2
-
- Call UninstallXYNTService
-
-
-
-
- StrCpy $CustomFolderName ""
-
-
-
- Call OutputLocalRootInfoFile
-
-
- ifFileExists "$INSTDIR\*.*" +2 0
- CreateDirectory "$INSTDIR"
-
-
-
- StrCmp $isMDaemonInstalled "1" 0 TestNextHandle
- nsExec::Exec 'NET STOP MDAEMON' "" SH_HIDE
- Sleep 1000
- TestNextHandle:
-
- StrCmp $Set_For_SNF4Alligate_INSTALL "1" 0 Handlenext
- nsExec::Exec '"$SNF4AlligateInstallFolder\AGFiltSvc.exe" /Stop' "" SH_HIDE
- Sleep 1000
- nsExec::Exec 'net stop AgSMTPSvc' SH_HIDE
- Sleep 1000
- Handlenext:
-
- StrCmp $isDecludeInstalled "1" 0 +2
- nsExec::Exec "NET STOP Decludeproc" "" SH_HIDE
-
-
- SetOutPath $INSTDIR
- File "Restorer.exe"
- SetOutPath $SNFServerInstallDir
- ExecWait "$INSTDIR\Restorer.exe -F"
-
-
- StrCmp $Set_For_SNF4Alligate_INSTALL "1" 0 Handlenext2
- nsExec::Exec '"$SNF4AlligateInstallFolder\AGFiltSvc.exe" /start' "" SH_HIDE
- Sleep 1000
- nsExec::Exec 'net start AgSMTPSvc' "" SH_HIDE
- Sleep 1000
- Handlenext2:
-
- StrCmp $isMINIMIInstalled "1" 0 TestNext2
- nsExec::Exec 'NET STOP "IMail SMTP Server"' "" SH_HIDE
- Sleep 1000
- nsExec::Exec 'NET START "IMail SMTP Server"' "" SH_HIDE
- Sleep 1000
- Testnext2:
-
- StrCmp $isMDaemonInstalled "1" 0 TestNextHandle2
- nsExec::Exec 'NET STOP MDAEMON' "" SH_HIDE
- Sleep 3000
- nsExec::Exec 'net start MDAEMON' "" SH_HIDE
- Sleep 1000
- TestNextHandle2:
-
- StrCmp $isDecludeInstalled "1" 0 ThenQuit
- nsExec::Exec "NET STOP Decludeproc" "" SH_HIDE
- nsExec::Exec "NET START Decludeproc" "" SH_HIDE
-
- ThenQuit:
- call checkTelemetry
- return
- SectionEnd
-
- Section /o "Upgrade (Retain existing settings.)" g1o3
-
-
-
- Call UninstallXYNTService
-
-
-
- Call OutputLocalRootInfoFile
-
-
-
- IfFileExists "$INSTDIR\*.*" +2 0
- CreateDirectory "$INSTDIR"
-
-
-
- StrCmp $isMDaemonInstalled "1" 0 TestNextHandle
- nsExec::Exec 'NET STOP MDAEMON' "" SH_HIDE
- Sleep 3000
-
-
- TestNextHandle:
-
- StrCmp $isSNF4AlligateInstalled "1" 0 Handlenext
- nsExec::Exec 'net stop AgSMTPSvc' "" SH_HIDE
- Sleep 1000
- nsExec::Exec '"$SNF4AlligateInstallFolder\AGFiltSvc.exe" /stop' "" SH_HIDE
- Sleep 1000
- Handlenext:
-
-
- SetOutPath $INSTDIR
- File "Restorer.exe"
- SetOutPath $SNFServerInstallDir
- ExecWait "$INSTDIR\Restorer.exe"
-
-
- StrCmp $isMDaemonInstalled "1" 0 TestNextHandle2
- nsExec::Exec 'NET STOP MDAEMON' "" SH_HIDE
- Sleep 1000
- nsExec::Exec 'net start MDAEMON' "" SH_HIDE
- Sleep 1000
- TestNextHandle2:
-
- StrCmp $Set_For_SNF4Alligate_INSTALL "1" 0 Handlenext3
- nsExec::Exec '"$SNF4AlligateInstallFolder\AGFiltSvc.exe" /start' "" SH_HIDE
- Sleep 1000
- nsExec::Exec 'net start AgSMTPSvc' "" SH_HIDE
- Sleep 1000
- Handlenext3:
-
-
- StrCmp $isMINIMIInstalled "1" 0 TestNext
- nsExec::Exec 'NET STOP "IMail SMTP Server"' "" SH_HIDE
- Sleep 1000
- nsExec::Exec 'NET START "IMail SMTP Server"' "" SH_HIDE
- Sleep 1000
- Testnext:
-
- StrCmp $isDecludeInstalled "1" 0 ThenQuit
- nsExec::Exec "NET STOP Decludeproc" "" SH_HIDE
- nsExec::Exec "NET START Decludeproc" "" SH_HIDE
-
- ThenQuit:
- call checkTelemetry
- return
- SectionEnd
-
-
- Section /o "Archive Utility" g1o4
-
-
- SectionEnd
-
- Section /o "Restore Utility" g1o5
-
- SectionEnd
-
- Section /o "Remove Install" g1o6
-
-
- SectionEnd
-
- Section /o "Status Viewer" g1o6B
-
- SectionEnd
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Section /o "Imail w/ Declude Install" gIWDI ; g1o7 Imail w/ Declude Install
-
-
- SectionEnd
-
- Section /o "Imail MXGuard Install" gIMXI ; g1oA Imail w/ MXGuard Install
-
-
- SectionEnd
-
- Section /o "Imail w/MINIMI for SNF" gIMMI ; g1o7B Imail MiniMi Install
-
- SectionEnd
-
- Section /o "SmarterMail w/ Declude Install" gSWDI ; g1o8 Smartermail W/ Declude Install
-
-
- SectionEnd
-
- Section /o "SmarterMail MXGuard Install" gSMXI ; g1oA2 Smartermail W/ MXGuard Install
-
-
- SectionEnd
-
- Section /o "Alligate Install" gAWDI ; g1o9 Alligate w/
-
-
- SectionEnd
- SectionGroup /e "IceWarp" gIW
- Section /o "IceWarp in ~A.V.~ position" gIWTI ; IcewWarp Tie In ( In AntiVirus Position )
-
- SectionEnd
- Section /o "IceWarp As Custom-Filter (y/n) " gIWTICF ; IceWarp Tie In Custom Filter
-
- SectionEnd
- Section /o "IceWarp As Custom-Filter (+5)" gIWTICF2 ; IceWarp Tie In Custom Filter 2
-
- SectionEnd
- SectionGroupEnd
- Section /o "MailSite Install" gMSI
-
- SectionEnd
-
- Section /o "Kerio Mail Install" gKMI
-
- SectionEnd
-
- Section /o "MDaemon Install" gMDDLL
-
- SectionEnd
-
- Section /o "Default SNF Install / Sniffer Install" gSNFI ; g1oB
-
-
- SectionEnd
-
- Section /o "Unknown Server - Declude Install" gUSWDI ; g1oC
-
-
- SectionEnd
-
- Section /o "Other (custom/unknown combination)" gCUKC ; MDI_mx
- SectionEnd
-
-
-
- Function InitPlatformFlags
-
-
- StrCpy $isIceWarpInstalled "0"
- StrCpy $isMailSiteInstalled "0"
- StrCpy $isKerioInstalled "0"
- StrCpy $isImailInstalled "0"
- StrCpy $isSmarterMailInstalled "0"
- StrCpy $isAlligateInstalled "0"
- StrCpy $isDecludeInstalled "0"
- StrCpy $isMXGuardInstalled "0"
- StrCpy $isMINIMIInstalled "0"
- StrCpy $isMDaemonInstalled "0"
-
- StrCpy $SelectedCaseIndexForPlatformScreen "0"
- FunctionEND
-
- Function ResetSectionNames
-
-
-
-
-
-
- SectionSetText ${g1o1} "New Install"
- SectionSetText ${g1o2} "Install Fresh (Discard local configuration.)"
- SectionSetText ${g1o3} "Upgrade (Retain existing settings.)"
- SectionSetText ${g1o4} "Archive Utility"
- SectionSetText ${g1o5} "Rollback Altered Files"
- SectionSetText ${g1o6} "Remove Install"
- SectionSetText ${g1o6B} "Status Viewer"
-
- SectionSetText ${gIWDI} "Imail w/ Declude Install"
- SectionSetText ${gIMXI} "Imail MXGuard Install"
- SectionSetText ${gIMMI} "Imail w/MINIMI for SNF"
- SectionSetText ${gSWDI} "SmarterMail w/ Declude Install"
- SectionSetText ${gSMXI} "SmarterMail MXGuard Install"
- SectionSetText ${gAWDI} "Alligate Install"
- SectionSetText ${gIW} "IceWarp"
- SectionSetText ${gIWTI} "IceWarp in ~A.V.~ position"
- SectionSetText ${gIWTICF} "IceWarp as Content-Filter (y/n)"
- SectionSetText ${gIWTICF2} "IceWarp as Content-Filter (+5)"
-
- SectionSetText ${gMSI} ""
-
- SectionSetText ${gKMI} "Kerio Install"
-
- SectionSetText ${gMDDLL} "MDaemon Install"
- SectionSetText ${gSNFI} ""
- SectionSetText ${gUSWDI} ""
- SectionSetText ${gCUKC} "Other (custom/unknown combination)"
- FunctionEND
-
- Function .onInit
-
-
-
- nsExec::Exec /TIMEOUT=1500 "NET STOP SNFService"
- pop $0
- StrCmp $0 "0" 0 NotStoppable
-
- nsExec::Exec /TIMEOUT=1500 "NET START SNFService" SH_HIDE
- pop $0
- Goto FineToRunInstaller
-
- NotStoppable:
-
- SetOutPath $Temp
- ifFileExists "$Temp\SNFCLient.exe" +2 0
- File "SNFClient.exe"
- nsExec::Exec /TIMEOUT=1500 "$Temp\SNFClient.exe -status.second" SH_HIDE
- pop $0
- StrCmp $0 "0" 0 +3
- MessageBox MB_OK "SNFServer was detected running on this system. You must stop the SNFServer in order to run this installer."
- Quit
- Delete "$Temp/SNFClient.exe"
- SetOutPath $INSTDIR
-
-
- FineToRunInstaller:
-
- System::Call 'kernel32::CreateMutexA(i 0, i 0, t "Sniffer Untility Mng") i .r1 ?e'
- Pop $R0
- StrCmp $R0 0 +3
- MessageBox MB_OK|MB_ICONEXCLAMATION "The Message Sniffer Utility Manager is already running."
- Abort
-
-
- InitPluginsDir
- SetOutPath "$PLUGINSDIR"
-
- File "SnifferSplash.bmp"
- newadvsplash::show 3000 100 500 0x04025C "$PLUGINSDIR\SnifferSplash.bmp"
- Sleep 1000
- Delete "$PLUGINSDIR\SnifferSplash.bmp"
-
-
-
- StrCpy $MissingApplicationName ""
- StrCpy $FindApplicationMessage ""
- StrCpy $MissingApplicationFolder ""
- StrCpy $Find_Explanation_INFO ""
-
-
-
- StrCpy $ArchivesAvailable "0"
- StrCpy $ShowRestoreOptionsPage "0"
- StrCpy $HandleUninstallPage "0"
- StrCpy $ShowTelemetryPage "0"
-
-
- StrCpy $PreviousSnifferInstalled "0"
- StrCpy $MessageSnifferRestoreDir ""
- StrCpy $OldVersionOfSniffer "0"
-
- StrCpy $currentPlatformSelection "55"
- StrCpy $currentUtilitySelection "0"
- StrCpy $Set_For_MINIMI_INSTALL "0"
- StrCpy $Set_For_SNF4Alligate_INSTALL "0"
-
-
- Call DetermineInstallationPlatforms
-
-
- FunctionEnd
-
-
-
-
- Function setBestPlatformGuess
-
-
- FunctionEnd
-
-
-
-
-
-
-
-
-
- Function setupPlatforms
-
- SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:Message Sniffer Platform Selection:"
- !insertmacro BIMAGE "SnifferBanner.bmp" ""
-
- SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:Message Sniffer Server 3.0 Install Utility:"
- !insertmacro BIMAGE "SnifferBanner.bmp" ""
-
-
- Call ResetSectionNames
-
- StrCpy $BaseRadioDefault $currentPlatformSelection
-
-
-
-
- !insertmacro UnselectSection ${g1o1}
- !insertmacro UnselectSection ${g1o2}
- !insertmacro UnselectSection ${g1o3}
- !insertmacro UnselectSection ${g1o4}
- !insertmacro UnselectSection ${g1o5}
- !insertmacro UnselectSection ${g1o6}
-
-
-
- !insertmacro UnselectSection ${g1o6B}
-
-
- SectionSetText ${g1o1} ""
- SectionSetText ${g1o2} ""
- SectionSetText ${g1o3} ""
- SectionSetText ${g1o4} ""
- SectionSetText ${g1o5} ""
- SectionSetText ${g1o6} ""
- SectionSetText ${g1o6B} ""
-
- StrCmp $SelectedCaseIndexForPlatformScreen "0" 0 LeaveEnabled
-
-
- Var /GLOBAL NextButton
- GetDlgItem $NextButton $HWNDPARENT 1
- EnableWindow $NextButton "0"
- LeaveEnabled:
-
-
-
- Var /GLOBAL testUnknownDeclude
- StrCpy $testUnknownDeclude "1"
-
-
-
-
-
-
-
-
-
-
-
- !insertmacro UnselectSection ${gIWDI}
- !insertmacro UnselectSection ${gIMXI}
- !insertmacro UnselectSection ${gIMMI}
- !insertmacro UnselectSection ${gSWDI}
- !insertmacro UnselectSection ${gSMXI}
- !insertmacro UnselectSection ${gAWDI}
- SectionSetText ${gSNFI} ""
-
- SectionSetText ${gUSWDI} ""
- !insertmacro UnselectSection ${gIWTI}
- !insertmacro UnselectSection ${gIWTICF}
- !insertmacro UnselectSection ${gIWTICF2}
-
- SectionSetText ${gMSI} ""
-
- SectionSetText ${gKMI} ""
- !insertmacro UnselectSection ${gMDDLL}
- !insertmacro UnselectSection ${gCUKC}
-
-
-
-
-
-
-
-
-
-
-
- ${Switch} $SelectedCaseIndexForPlatformScreen
- ${Case} "gIWDI"
- !insertmacro SelectSection ${gIWDI}
- Return
- ${Case} "gIMXI"
- !insertmacro SelectSection ${gIMXI}
- Return
- ${Case} "gIMMI"
- !insertmacro SelectSection ${gIMMI}
- Return
- ${Case} "gSWDI"
- !insertmacro SelectSection ${gSWDI}
- Return
- ${Case} "gSMXI"
- !insertmacro SelectSection ${gSMXI}
- Return
- ${Case} "gAWDI"
- !insertmacro SelectSection ${gAWDI}
- Return
- ${Case} "gIWTI"
- !insertmacro SelectSection ${gIWTI}
- Return
- ${Case} "gIWTICF"
- !insertmacro SelectSection ${gIWTICF}
- Return
- ${Case} "gIWTICF2"
- !insertmacro SelectSection ${gIWTICF2}
- Return
- ${Case} "gMSI"
-
- Return
- ${Case} "gKMI"
- !insertmacro SelectSection ${gKMI}
- Return
- ${Case} "gMDDLL"
- !insertmacro SelectSection ${gMDDLL}
- Return
- ${Case} "gSNFI"
- !insertmacro UnselectSection ${gSNFI}
-
- Return
- ${Case} "gUSWDI"
- !insertmacro SelectSection ${gUSWDI}
- Return
- ${Case} "gCUKC"
- !insertmacro SelectSection ${gCUKC}
- Return
- ${Default}
-
- EnableWindow $NextButton "0"
- ${EndSwitch}
-
-
-
-
- call setBestPlatformGuess
-
- FunctionEnd
-
-
-
-
-
-
-
-
-
-
-
- Function setupComponents2
-
-
- SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:Message Sniffer Server 3.0 Install Utility:"
- !insertmacro BIMAGE "SnifferBanner.bmp" ""
-
-
- GetDlgItem $NextButton $HWNDPARENT 1
- EnableWindow $NextButton "0"
-
-
- StrCpy $BaseRadioDefault $currentUtilitySelection
-
-
- Call ResetSectionNames
-
-
-
-
-
-
-
- !insertmacro UnselectSection ${g1o1}
- !insertmacro UnselectSection ${g1o2}
- !insertmacro UnselectSection ${g1o3}
- !insertmacro UnselectSection ${g1o4}
- !insertmacro UnselectSection ${g1o5}
- !insertmacro UnselectSection ${g1o6}
- !insertmacro UnselectSection ${g1o6B}
- !insertmacro UnselectSection ${gIW}
- !insertmacro UnselectSection ${gIWDI}
- !insertmacro UnselectSection ${gIMXI}
- !insertmacro UnselectSection ${gIMMI}
- !insertmacro UnselectSection ${gSWDI}
- !insertmacro UnselectSection ${gSMXI}
- !insertmacro UnselectSection ${gAWDI}
-
- !insertmacro UnselectSection ${gIWTI}
- !insertmacro UnselectSection ${gIWTICF}
- !insertmacro UnselectSection ${gIWTICF2}
- !insertmacro UnselectSection ${gMSI}
-
- !insertmacro UnselectSection ${gKMI}
- !insertmacro UnselectSection ${gMDDLL}
- !insertmacro UnselectSection ${gSNFI}
- !insertmacro UnselectSection ${gUSWDI}
- !insertmacro UnselectSection ${gCUKC}
-
-
-
-
- SectionSetText ${gIWDI} ""
- SectionSetText ${gIMXI} ""
- SectionSetText ${gIMMI} ""
- SectionSetText ${gSWDI} ""
- SectionSetText ${gSMXI} ""
- SectionSetText ${gAWDI} ""
- SectionSetText ${gIW} ""
- SectionSetText ${gIWTI} ""
- SectionSetText ${gIWTICF} ""
- SectionSetText ${gIWTICF2} ""
- SectionSetText ${gMSI} ""
- SectionSetText ${gKMI} ""
- SectionSetText ${gMDDLL} ""
- SectionSetText ${gSNFI} ""
- SectionSetText ${gUSWDI} ""
- SectionSetText ${gCUKC} ""
-
-
- StrCmp $PreviousSnifferInstalled "0" RunFreshInstaller RunChoices
- RunFreshInstaller:
- StrCmp $ArchivesAvailable "0" RunFreshNoRestore RunWithRestore
- RunFreshNoRestore:
-
- !insertmacro UnselectSection ${g1o1}
- SectionSetText ${g1o2} ""
- SectionSetText ${g1o3} ""
- SectionSetText ${g1o4} ""
- SectionSetText ${g1o5} ""
- SectionSetText ${g1o6} ""
- SectionSetText ${g1o6B} ""
- Return
- RunWithRestore:
-
- !insertmacro UnselectSection ${g1o1}
- SectionSetText ${g1o2} ""
- SectionSetText ${g1o3} ""
- SectionSetText ${g1o4} ""
- SectionSetText ${g1o5} ""
- SectionSetText ${g1o6} ""
- SectionSetText ${g1o6B} ""
-
- Return
- RunChoices:
-
-
-
- SectionSetText ${g1o1} ""
- !insertmacro UnselectSection ${g1o2}
- !insertmacro UnselectSection ${g1o3}
- SectionSetText ${g1o4} ""
- SectionSetText ${g1o5} ""
- !insertmacro UnselectSection ${g1o6}
-
-
-
-
-
-
-
-
-
-
- NextItem:
- !insertmacro UnselectSection ${g1o6B}
-
-
- StrCpy $BaseRadioDefault "1"
-
- Return
- FunctionEnd
-
-
-
- Function Components2_Leave
-
- StrCmp $ShowRestoreOptionsPage "1" 0 +4
-
- MessageBox MB_OK "Attempting to Restore. This code should be stubbed."
-
- Quit
- return
- StrCmp $ShowArchiveOptionsPage "1" 0 +2
- return
- StrCmp $ShowTelemetryPage "1" 0 +2
- return
- StrCmp $HandleUninstallPage "1" 0 +2
- return
-
- StrCmp $Set_For_MINIMI_INSTALL "1" 0 done
- StrCmp $SelectedCaseIndexForPlatformScreen "gIMMI" 0 done
- call InstallMINIMI
- done:
-
- StrCmp $Set_For_SNF4Alligate_INSTALL "1" 0 done2
- StrCmp $SelectedCaseIndexForPlatformScreen "gAWDI" 0 done2
- call InstallSNF4Alligate
- done2:
-
- return
- FunctionEnd
-
-
-
- Function setupINSTALLDIR
-
-
- var /Global temp1
- var /Global temp2
-
-
-
-
-
-
-
-
- ${Switch} $SelectedCaseIndexForPlatformScreen
-
- ${Case} "gIWDI"
-
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\global.cfg" +3 0
- MessageBox MB_OK "Please select the location path where decludes global.cfg file exists."
- Goto NoPassFromHere
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
-
- ${Case} "gIMXI"
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\mxguard.ini" +3 0
- MessageBox MB_OK "Please select the location path where the mxguard.ini file exists."
- Goto NoPassFromHere
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
-
- ${Case} "gIMMI"
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\SMTP32.EXE" +3 0
- MessageBox MB_OK "Please select the location path where IMails SMTP32.exe resides."
- Goto NoPassFromHere
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
-
- ${Case} "gSWDI"
-
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\global.cfg" +3 0
- MessageBox MB_OK "Please select the location path where decludes global.cfg file exists."
- Goto NoPassFromHere
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
-
- ${Case} "gSMXI"
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\mxguard.ini" +3 0
- MessageBox MB_OK "Please select the location path where the mxguard.ini file exists."
- Goto NoPassFromHere
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
-
- ${Case} "gAWDI"
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\AGFiltSvc.exe" +3 0
- MessageBox MB_OK "Please select the location path where Alligates AGFiltSvc.exe resides."
- Goto NoPassFromHere
- ifFileExists "$temp1\Drop" +3 0
- MessageBox MB_OK "There is no Drop folder in your Alligate location."
- Goto NoPassFromHere
- ifFileExists "$temp1\Drop" +3 0
- MessageBox MB_OK "There is no Spool folder in your Alligate location."
- Goto NoPassFromHere
-
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
- ${Case} "gIWTICF"
- ${Case} "gIWTICF2"
- ${Case} "gIWTI"
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\config\*.*" 0 NoPassFromHere
- ifFileExists "$temp1\config\content.xml" +3 0
- MessageBox MB_OK "Please select the location path where IceWarp is installed. [IceWarpRoot]\config\content.xml couldn't be found."
- Goto NoPassFromHere
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
- ${Case} "gMSI"
-
- ${Case} "gKMI"
-
- ${Case} "gMDDLL"
-
- ${NSD_GetText} $SNF_SearchFor_Location $R0
- StrCpy $temp1 $R0
- ifFileExists "$temp1\App\*.*" 0 NoPassFromHere
- ifFileExists "$temp1\App\MDaemon.exe" +3 0
- MessageBox MB_OK "Please select the location path where MDaemon is installed. [MDaemon]\App\MDaemon.exe couldn't be found."
- Goto NoPassFromHere
-
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- StrCpy $SNFServerInstallDir $temp1
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
-
-
- ${Case} "gSNFI"
-
- ${Case} "gUSWDI"
-
-
-
-
-
- ${Case} "gCUKC"
- ${NSD_GetText} $SNF_SearchFor_LocationB $R0
- StrCpy $temp2 $R0
- StrCmp $temp2 "" 0 +3
- MessageBox MB_OK "You must define a folder as the install directory."
- Goto NoPassFromHere
-
-
- ifFileExists "$temp2\*.*" +2 0
- CreateDirectory $temp2
-
- ${GetParent} $temp2 $SNFServerInstallDir
- StrCpy $INSTDIR $temp2
-
- Goto ProceedWithInstallDirSetup
- ${Default}
-
-
-
- EnableWindow $NextButton "0"
- ${EndSwitch}
-
- NoPassFromHere:
- abort
-
- ProceedWithInstallDirSetup:
-
-
-
-
- StrCpy $OldVersionOfSniffer "0"
- StrCpy $PreviousSnifferInstalled "0"
- StrCpy $ArchivesAvailable "0"
-
- IfFileExists "$INSTDIR\identity.xml" SetPreviouslyInstalledFlag 0
- StrCpy $PreviousSnifferInstalled "0"
-
- Goto ContinueInit
- SetPreviouslyInstalledFlag:
- IfFileExists "$INSTDIR\$LicenseID.exe" 0 +2
- StrCpy $OldVersionOfSniffer "1"
- StrCpy $PreviousSnifferInstalled "1"
- ContinueInit:
-
-
-
- StrCpy $ArchivesAvailable "0"
-
-
-
-
-
- Call OutputLocalRootInfoFile
- RETURN
- FunctionEnd
-
- Function OutputLocalRootInfoFile
-
-
-
- SetOutPath $INSTDIR
- Var /GLOBAL myContextFile
- FileOpen $myContextFile "$INSTDIR\LocalRoot.txt" w
- FileWrite $myContextFile "<root>$SNFServerInstallDir</root><cd>$INSTDIR</cd>"
- FileClose $myContextFile
-
-
- FunctionEnd
-
-
-
-
-
-
-
-
- Function .onSelChange
-
- GetDlgItem $NextButton $HWNDPARENT 1
- EnableWindow $NextButton "1"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Var /Global TheAddition
- Var /Global Report
- StrCpy $Report ""
- SectionGetFlags ${gIWTI} $TheAddition
- StrCpy $Report $Report$TheAddition
- SectionGetFlags ${gIWTICF} $TheAddition
- StrCpy $Report $Report$TheAddition
- SectionGetFlags ${gIWTICF2} $TheAddition
- StrCpy $Report $Report$TheAddition
- StrCmp $Report "111" 0 ContineButtonAnalysis
- !insertmacro UnselectSection ${gIWTI}
- !insertmacro UnselectSection ${gIWTICF}
- !insertmacro UnselectSection ${gIWTICF2}
- ContineButtonAnalysis:
-
-
-
-
-
- StrCpy $1 $BaseRadioDefault
- !insertmacro StartRadioButtons $1
-
- !insertmacro RadioButton ${g1o1}
- !insertmacro RadioButton ${g1o2}
- !insertmacro RadioButton ${g1o3}
- !insertmacro RadioButton ${g1o4}
- !insertmacro RadioButton ${g1o5}
- !insertmacro RadioButton ${g1o6}
- !insertmacro RadioButton ${g1o6B}
-
-
- !insertmacro RadioButton ${gIWDI}
- !insertmacro RadioButton ${gIMXI}
- !insertmacro RadioButton ${gIMMI}
- !insertmacro RadioButton ${gSWDI}
- !insertmacro RadioButton ${gSMXI}
- !insertmacro RadioButton ${gAWDI}
-
-
- !insertmacro RadioButton ${gIWTI}
-
- !insertmacro RadioButton ${gIWTICF}
-
- !insertmacro RadioButton ${gIWTICF2}
-
- !insertmacro RadioButton ${gMSI}
- !insertmacro RadioButton ${gKMI}
- !insertmacro RadioButton ${gMDDLL}
- !insertmacro RadioButton ${gSNFI}
- !insertmacro RadioButton ${gUSWDI}
- !insertmacro RadioButton ${gCUKC}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- !insertmacro EndRadioButtons
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- !insertmacro UnselectSection ${g1o1}
- !insertmacro UnselectSection ${g1o2}
- !insertmacro UnselectSection ${g1o3}
- !insertmacro UnselectSection ${g1o4}
- !insertmacro UnselectSection ${g1o5}
- !insertmacro UnselectSection ${g1o6}
- !insertmacro UnselectSection ${g1o6B}
-
- !insertmacro UnselectSection ${gIWDI}
- !insertmacro UnselectSection ${gIMXI}
- !insertmacro UnselectSection ${gIMMI}
- !insertmacro UnselectSection ${gSWDI}
- !insertmacro UnselectSection ${gSMXI}
- !insertmacro UnselectSection ${gAWDI}
-
- !insertmacro UnselectSection ${gIWTI}
- !insertmacro UnselectSection ${gIWTICF}
- !insertmacro UnselectSection ${gIWTICF2}
- !insertmacro UnselectSection ${gMSI}
- !insertmacro UnselectSection ${gKMI}
- !insertmacro UnselectSection ${gMDDLL}
- !insertmacro UnselectSection ${gSNFI}
- !insertmacro UnselectSection ${gUSWDI}
- !insertmacro UnselectSection ${gCUKC}
-
-
- StrCpy $BaseRadioDefault $1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${Switch} $1
- ${Case} "7"
- StrCpy $SelectedCaseIndexForPlatformScreen "gIWDI"
- !insertmacro SelectSection ${gIWDI}
- Call SetInstallForDeclude
-
-
-
- StrCpy $currentPlatformSelection $1
- return
- ${Case} "8"
- StrCpy $SelectedCaseIndexForPlatformScreen "gIMXI"
- !insertmacro SelectSection ${gIMXI}
- Call SetInstallForMXGuard
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "9"
- StrCpy $SelectedCaseIndexForPlatformScreen "gIMMI"
- !insertmacro SelectSection ${gIMMI}
- Call SetInstallForMINIMI
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "10"
- StrCpy $SelectedCaseIndexForPlatformScreen "gSWDI"
- !insertmacro SelectSection ${gSWDI}
- Call SetInstallForDeclude
-
-
- StrCpy $currentPlatformSelection $1
- return
- ${Case} "11"
- StrCpy $SelectedCaseIndexForPlatformScreen "gSMXI"
- !insertmacro SelectSection ${gSMXI}
- Call SetInstallForMXGuard
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "12"
- StrCpy $SelectedCaseIndexForPlatformScreen "gAWDI"
- !insertmacro SelectSection ${gAWDI}
- Call SetInstallForSNF4Alligate
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "13"
- ${Case} "14"
- WriteRegStr HKLM "SOFTWARE\MessageSniffer" "IceWarpType" "AV"
- StrCpy $SelectedCaseIndexForPlatformScreen "gIWTI"
- !insertmacro SelectSection ${gIWTI}
-
- StrCpy $currentPlatformSelection $1
- return
- ${Case} "15"
- WriteRegStr HKLM "SOFTWARE\MessageSniffer" "IceWarpType" "CF"
- StrCpy $SelectedCaseIndexForPlatformScreen "gIWTICF"
- !insertmacro SelectSection ${gIWTICF}
-
- StrCpy $currentPlatformSelection $1
- return
- ${Case} "16"
- WriteRegStr HKLM "SOFTWARE\MessageSniffer" "IceWarpType" "SS"
- StrCpy $SelectedCaseIndexForPlatformScreen "gIWTICF2"
- !insertmacro SelectSection ${gIWTICF2}
-
- StrCpy $currentPlatformSelection $1
- return
- ${Case} "18"
- StrCpy $SelectedCaseIndexForPlatformScreen "gMSI"
- !insertmacro SelectSection ${gMSI}
-
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "19"
- StrCpy $SelectedCaseIndexForPlatformScreen "gKMI"
- !insertmacro SelectSection ${gKMI}
-
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "20"
- StrCpy $SelectedCaseIndexForPlatformScreen "gMDDLL"
- !insertmacro SelectSection ${gMDDLL}
-
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "21"
- StrCpy $SelectedCaseIndexForPlatformScreen "gSNFI"
- !insertmacro SelectSection ${gSNFI}
-
-
-
-
-
-
-
-
- return
-
-
- ${Case} "22"
- StrCpy $SelectedCaseIndexForPlatformScreen "gUSWDI"
- !insertmacro SelectSection ${gUSWDI}
-
- StrCpy $currentPlatformSelection $1
- return
-
- ${Case} "23"
- StrCpy $SelectedCaseIndexForPlatformScreen "gCUKC"
-
- !insertmacro SelectSection ${gCUKC}
- return
-
-
-
-
- ${Case} "6"
- StrCpy $ShowRestoreOptionsPage "0"
- StrCpy $ShowArchiveOptionsPage "0"
- StrCpy $ShowTelemetryPage "1"
- StrCpy $HandleUninstallPage "0"
- !insertmacro SelectSection ${g1o6B}
- StrCpy $currentUtilitySelection $1
- Return
-
- ${Case} "5"
- StrCpy $HandleUninstallPage "1"
- StrCpy $ShowArchiveOptionsPage "0"
- StrCpy $ShowTelemetryPage "0"
- StrCpy $ShowRestoreOptionsPage "0"
- !insertmacro SelectSection ${g1o6}
- StrCpy $currentUtilitySelection $1
- Return
- ${Case} "4"
- StrCpy $ShowRestoreOptionsPage "1"
- StrCpy $ShowArchiveOptionsPage "0"
- StrCpy $ShowTelemetryPage "0"
- StrCpy $HandleUninstallPage "0"
- !insertmacro SelectSection ${g1o5}
- StrCpy $currentUtilitySelection $1
- Return
- ${Case} "3"
- StrCpy $ShowArchiveOptionsPage "1"
- StrCpy $ShowRestoreOptionsPage "0"
- StrCpy $ShowTelemetryPage "0"
- StrCpy $HandleUninstallPage "0"
- !insertmacro SelectSection ${g1o4}
- StrCpy $currentUtilitySelection $1
- Return
- ${Case} "2"
- StrCpy $ShowRestoreOptionsPage "0"
- StrCpy $ShowTelemetryPage "0"
- StrCpy $ShowArchiveOptionsPage "0"
- StrCpy $HandleUninstallPage "0"
- !insertmacro SelectSection ${g1o3}
- StrCpy $currentUtilitySelection $1
- Return
- ${Case} "1"
- StrCpy $ShowRestoreOptionsPage "0"
- StrCpy $ShowArchiveOptionsPage "0"
- StrCpy $ShowTelemetryPage "0"
- StrCpy $HandleUninstallPage "0"
- !insertmacro SelectSection ${g1o2}
- StrCpy $currentUtilitySelection $1
- Return
- ${Case} "0"
- StrCpy $ShowRestoreOptionsPage "0"
- StrCpy $ShowArchiveOptionsPage "0"
- StrCpy $ShowTelemetryPage "0"
- StrCpy $HandleUninstallPage "0"
- !insertmacro SelectSection ${g1o1}
- StrCpy $currentUtilitySelection $1
- Return
- ${Case} "\"
- StrCpy $ShowRestoreOptionsPage "0"
- StrCpy $ShowArchiveOptionsPage "0"
- StrCpy $ShowTelemetryPage "0"
- StrCpy $HandleUninstallPage "0"
- !insertmacro SelectSection ${g1o1}
- StrCpy $currentUtilitySelection "0"
- Return
- ${Default}
-
-
-
- EnableWindow $NextButton "0"
- ${EndSwitch}
- FunctionEnd
-
-
-
- Function nsDialogHandleUninstall
-
- StrCmp $HandleUninstallPage "1" 0 exit_nsDialogsUninstall
-
- SetOutPath $INSTDIR
- ifFileExists "$INSTDIR\uninstall.exe" 0 NotifyFind
- SetOutPath $SNFServerInstallDir
- ExecWait "$INSTDIR\uninstall.exe"
- StrCpy $R9 "-4"
- Call RelGotoPage
- return
- NotifyFind:
- MessageBox MB_OK "Message Sniffer Utility is unable to locate the Uninstaller in the proper directory. Please search for the uninstall.exe in the proper directory."
- StrCpy $R9 "-4"
- Call RelGotoPage
-
- exit_nsDialogsUninstall:
- return
- FunctionEND
-
- Function nsDialogsTelemetryShow
- StrCmp $ShowTelemetryPage "1" 0 exit_nsDialogsTelemetry
- !insertmacro BIMAGE "SnifferBannerArchive.bmp" ""
-
- GetDlgItem $0 $HWNDPARENT 1
- SendMessage $0 ${WM_SETTEXT} 0 "STR:Exit Status"
-
- SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:Message Sniffer Server 3.0 Status Viewer:"
-
- Var /GLOBAL TEXTBOX_Telemetry
- Var /GLOBAL TelemetryData
- Var /GLOBAL TelemetryGo
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $0
- ${NSD_CreateLabel} 0 0 100% 90 "Greetings. This is the quick status checking screen. You may press the test buttons to manually reload the status and rulebase authentication validation."
- Pop $0
-
- ${NSD_CreateLabel} 0 30 100% 80u "Press to load status...."
- Pop $TEXTBOX_Telemetry
-
- ${NSD_CreateButton} 0 180 30% 14u "Retest Status"
- Pop $TelemetryGo
- GetFunctionAddress $0 reloadTelemetry
- nsDialogs::OnClick /NOUNLOAD $TelemetryGo $0
-
- nsDialogs::Show
- exit_nsDialogsTelemetry:
-
- FunctionEnd
-
- Function reloadTelemetry
-
- ${GetBetween} "licenseid='" "'" "$INSTDIR\identity.xml" $LicenseID
- ${GetBetween} "authentication='" "'" "$INSTDIR\identity.xml" $Authentication
-
- StrCpy $TelemetryData "" "Starting Status Test.$\r$\n"
- StrCpy $TelemetryData "" "$TelemetryData $\r$\nLicense = $LicenseID Authentication = $Authentication"
-
- nsExec::ExecToStack 'NET START SNFService'
- Pop $0
- StrCpy $TelemetryData "$TelemetryData$\r$\n NET START Return Code: $0"
- Pop $1
- StrCpy $TelemetryData "$TelemetryData$\r$\n $1"
-
- nsExec::ExecToStack '$INSTDIR\SNFService'
- Pop $0
- Pop $1
- StrCpy $TelemetryData "$TelemetryData$\r$\n $1"
-
-
- nsExec::ExecToStack '"$INSTDIR\snf2check.exe" "$INSTDIR\$LicenseID.snf" "$Authentication"'
- Pop $0
- StrCpy $TelemetryData "$TelemetryData$\r$\n snf2check return code: $0"
- Pop $1
- StrCpy $TelemetryData "$TelemetryData$\r$\n $1"
-
-
-
- nsExec::ExecToStack '$INSTDIR\SNFClient -status.second'
- Pop $0
- StrCpy $TelemetryData "$TelemetryData$\r$\n SNFClient return code: $0"
- Pop $1
- StrCpy $TelemetryData "$TelemetryData$\r$\n $1"
- MessageBox MB_OK "$1"
-
-
- SendMessage $TEXTBOX_Telemetry ${WM_SETTEXT} 0 "STR:$TelemetryData"
-
- FunctionEND
-
-
-
- Function nsDialogsTelemetryLeave
- StrCpy $R9 "-1"
- Call RelGotoPage
- FunctionEND
-
-
-
-
- Function nsDialogInstall
- SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:Install Utility Unpacking Components:"
- !insertmacro BIMAGE "SnifferBanner2.bmp" ""
- FunctionEND
-
-
-
-
-
- Function .onUserAbort
-
- SetOutPath "$SNFServerInstallDir"
-
-
- FunctionEnd
-
- Function check_CompoundEnable
- VAR /GLOBAL Compound_Enable1
- VAR /GLOBAL Compound_Enable2
-
- EnableWindow $NextButton "0"
-
- StrCmp $Compound_Enable1 "0" 0 +2
- return
- StrCmp $Compound_Enable2 "0" 0 +2
- return
-
-
- EnableWindow $NextButton "1"
- return
- FunctionEnd
-
-
- Function FindApplicationPath
-
- Var /Global windowHandle
- nsDialogs::Create /NOUNLOAD 1018
- Pop $windowHandle
-
- SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:Please locate the $MissingApplicationName folders."
- !insertmacro BIMAGE "SnifferBanner.bmp" ""
-
-
- GetDlgItem $NextButton $HWNDPARENT 1
- EnableWindow $NextButton "0"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Var /Global HowToFindMessage
- Var /Global SNF_StartLookingHere
- StrCpy $SNF_StartLookingHere "C:\Program Files\SNF"
- StrCpy $Compound_Enable1 "0"
- StrCpy $Compound_Enable2 "0"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${Switch} $SelectedCaseIndexForPlatformScreen
- ${Case} "gIWDI"
-
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer under Declude with an Imail configuration. You will need to confirm the location of the following items:"
-
-
- Call DetermineImail
- StrCmp $IsImailInstalled "1" 0 NoImailFound
- Call DetermineDeclude
- StrCmp $IsDecludeInstalled "1" 0 NoDecludeFound
- StrCpy $FindApplicationMessage "Imail was found. Please confirm the folder for Declude's global.cfg file. "
- Goto +2
- NoDecludeFound:
- StrCpy $FindApplicationMessage "Imail was found. Declude was not. Please find Declude's global.cfg file."
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$SNFServerInstallDir"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateDecludeFolder
-
- ifFileExists "$SNFServerInstallDir\global.cfg" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$SNFServerInstallDir\SNF"
- Goto EndDisplayChoices
-
- ${Case} "gIMXI"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer under MXGuard with an Imail configuration. You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "Imail w/ MXGuard"
-
-
- Call DetermineImail
- StrCmp $IsImailInstalled "1" 0 NoImailFound
- Call DetermineMXGuard
- StrCmp $IsMXGuardInstalled "1" 0 NoMXGuardFound
- StrCpy $FindApplicationMessage "Imail was found. Please confirm the folder for MXGuard. "
- Goto +2
- NoMXGuardFound:
- StrCpy $FindApplicationMessage "Imail was found. MXGuard was not. Please find MXGuards/ install directory."
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$MXGuardInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateMXGuardFolder
-
- ifFileExists "$MXGuardInstallFolder\mxguard.ini" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$MXGuardInstallFolder\SNF"
- Goto EndDisplayChoices
-
- ${Case} "gIMMI"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer with MINIMI for the Imail server. You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "Imail w/ MINIMI"
-
-
- Call DetermineImail
- StrCmp $IsImailInstalled "1" 0 NoImailFound
- Call DetermineMINIMI
- StrCmp $IsMINIMIInstalled "1" 0 NoMINIMIFound
- StrCpy $FindApplicationMessage "Imail was found. Please confirm the folder for MINIMI to be installed in $\nby finding Imail's location for smtp32. "
- Goto +2
- NoMINIMIFound:
- StrCpy $FindApplicationMessage "Imail was found. MINIMI was not. Please confirm the location for MINIMI.$\n(Imail's location for smtp32.)"
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$MINIMIInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateMINIMIFolder
-
- ifFileExists "$MINIMIInstallFolder\SMTP32.exe" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$MINIMIInstallFolder\SNF"
-
- Goto EndDisplayChoices
-
- ${Case} "gSWDI"
-
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer with Declude under SmarterMail. You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "Smartermail w/ Declude"
-
-
- Call DetermineSmarterMail
- StrCmp $IsSmarterMailInstalled "1" 0 NoSmarterMail
- Call DetermineDeclude
- StrCmp $IsDecludeInstalled "1" 0 NoDeclude_Found
- StrCpy $FindApplicationMessage "SmarterMail was found. Please confirm the folder for Declude's global.cfg file. "
- Goto +2
- NoDeclude_Found:
- StrCpy $FindApplicationMessage "SmarterMail was found. Declude was not. Please find Declude's global.cfg file."
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$SNFServerInstallDir"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateDecludeFolder
-
- ifFileExists "$SNFServerInstallDir\global.cfg" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
-
- StrCpy $SNF_StartLookingHere "$SNFServerInstallDir\SNF"
- Goto EndDisplayChoices
-
- ${Case} "gSMXI"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer with MXGuard under SmarterMail. You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "Smartermail w/ MXGuard"
-
-
- Call DetermineSmarterMail
- StrCmp $IsSmarterMailInstalled "1" 0 NoSmarterMail
- Call DetermineMXGuard
- StrCmp $IsMXGuardInstalled "1" 0 NoSMMXGuardFound
- StrCpy $FindApplicationMessage "SmarterMail was found. Please confirm the folder for MXGuard. "
- Goto +2
- NoSMMXGuardFound:
- StrCpy $FindApplicationMessage "SmarterMail was found. MXGuard was not. Please find MXGuards mxguard.ini file. $\nTypical locations would be in: [root]\Program Files\dgSoft Internet Services\mxGuard for Mail Servers."
-
- StrCmp $MXGuardInstallFolder "" 0 +2
- StrCpy $MXGuardInstallFolder "C:\Program Files\dgSoft Internet Services\mxGuard for Mail Servers"
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$MXGuardInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateMXGuardFolder
-
- ifFileExists "$MXGuardInstallFolder\mxguard.ini" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$MXGuardInstallFolder\SNF"
-
-
-
- Goto EndDisplayChoices
-
- ${Case} "gAWDI"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer with Alligate. You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "Alligate"
-
-
- Call DetermineAlligate
- StrCmp $IsAlligateInstalled "1" 0 NoAlligateFound
- Call DetermineSNF4Alligate
- StrCmp "1" 0 NoSNF4AlligateFound
- StrCpy $FindApplicationMessage "Alligate was found. Please confirm the folder for SNF4Alligate to be installed in $\nby confirming Alligates install location for AGFiltSVC.exe "
- Goto +2
- NoSNF4AlligateFound:
- StrCpy $FindApplicationMessage "Alligate was found. SNF4Alligate was not. Please confirm the location for SNF4Alligate \n(Same as Alligate's location for AGFiltSVC.exe)"
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$AlligateInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateSNF4AlligateFolder
-
- StrCpy $SNF4AlligateInstallFolder $AlligateInstallFolder
- ifFileExists "$AlligateInstallFolder\AGFiltSvc.exe" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$AlligateInstallFolder\SNF"
-
- Goto EndDisplayChoices
- ${Case} "gIWTICF"
- ${Case} "gIWTICF2"
- ${Case} "gIWTI"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer with Icewarp You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "Icewarp"
-
-
- Call DetermineIceWarp
- StrCmp $IsIceWarpInstalled "1" 0 NoIceWarpFound
- IfFileExists "$IceWarpInstallFolder\config\content.xml" 0 NoContentXMLFound
- StrCpy $FindApplicationMessage "IceWarp was found. Please confirm Icewarp's install location."
- Goto +2
- NoContentXMLFound:
- StrCpy $FindApplicationMessage "IceWarp was found. Its content.xml was not. Please confirm the location of the [config] folder holding Merak\config\content.xml"
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$IceWarpInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateIceWarpFolder
-
- ifFileExists "$IceWarpInstallFolder\config\content.xml" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$IceWarpInstallFolder\SNF"
-
- Goto EndDisplayChoices
-
- ${Case} "gMSI"
- StrCpy $Find_Explanation_INFO "MailSite isn't fully supported yet."
- StrCpy $MissingApplicationName "MailSite"
-
- StrCpy $FindApplicationMessage "MailSite was not found."
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$MailSiteInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateMailSiteFolder
-
- ifFileExists "$MailSiteInstallFolder\*.*" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$MailSiteInstallFolder\SNF"
-
- Goto EndDisplayChoices
-
- ${Case} "gKMI"
- StrCpy $Find_Explanation_INFO "Kerio isn't fully supported yet."
- StrCpy $MissingApplicationName "Kerio"
-
- StrCpy $FindApplicationMessage "Kerio was not found."
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$KerioInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateKerioFolder
-
- ifFileExists "$KerioInstallFolder\*.*" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$KerioInstallFolder\SNF"
-
- Goto EndDisplayChoices
-
- ${Case} "gMDDLL"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer with MDaemon You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "MDaemon"
-
-
- Call DetermineMDaemon
- StrCmp $IsMDaemonInstalled "1" 0 NoMDaemon
- StrCpy $FindApplicationMessage "MDaemon was found. Please confirm where SNF should reside:"
- ifFileExists "$MDaemonInstallFolder\App\*.*" +2 0
- StrCpy $FindApplicationMessage "MDaemons App folder was not found. Please confirm the MDaemon and SNF locations:"
-
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$MDaemonInstallFolder"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateMDaemonFolder
-
- ifFileExists "$MDaemonInstallFolder\*.*" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$MDaemonInstallFolder\SNF"
-
- Goto EndDisplayChoices
-
- ${Case} "gSNFI"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer in a stand alone. You will need to confirm the location of the install directory."
- StrCpy $MissingApplicationName "Stand Alone Sniffer"
-
- Goto EndDisplayChoices
-
- ${Case} "gUSWDI"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer in an unidentified Declude install. You will need to confirm the location of the following items:"
- StrCpy $MissingApplicationName "Generic Declude Install"
-
-
- Call DetermineDeclude
- StrCmp $IsDecludeInstalled "1" 0 NoDeclude_Found
- StrCpy $FindApplicationMessage "No supporting mail server was recognized. Please locate the folder holding Declude's global.cfg file. "
- ${NSD_CreateDirRequest} 0 55% 75% 12u ""
- Pop $SNF_SearchFor_Location
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$SNFServerInstallDir"
-
- ${NSD_CreateBrowseButton} 340 55% 8% 12u "..."
- Pop $SNF_SearchFor_Location_Button
- ${NSD_OnClick} $SNF_SearchFor_Location_Button LocateDecludeFolder
-
- ifFileExists "$SNFServerInstallDir\global.cfg" 0 +3
- StrCpy $Compound_Enable2 "1"
-
- Call check_CompoundEnable
-
- StrCpy $SNF_StartLookingHere "$SNFServerInstallDir\SNF"
- Goto EndDisplayChoices
-
-
- ${Case} "gCUKC"
- StrCpy $Find_Explanation_INFO "You have chosen to install Sniffer in a stand alone. You will need to confirm the location of the install directory."
- StrCpy $MissingApplicationName "Custom / Unknown"
- StrCpy $FindApplicationMessage ""
- StrCpy $Compound_Enable2 "1"
- Call check_CompoundEnable
-
- Goto EndDisplayChoices
- ${Default}
-
-
-
- EnableWindow $NextButton "0"
- ${EndSwitch}
- EndDisplayChoices:
- Var /GLOBAL FindINSTDIRMessage
- StrCpy $FindINSTDIRMessage "Please locate the directory where you wish to install Message Sniffer. "
-
-
- ${NSD_CreateLabel} 0 0 75% 25% "$Find_Explanation_INFO"
- Pop $0
-
- ${NSD_CreateLabel} 0 25% 100% 30% "$FindApplicationMessage"
- Pop $HowToFindMessage
-
-
- ${NSD_CreateLabel} 0 70% 100% 15 "Please confirm/locate the folder you wish Message Sniffer to be installed in."
- Pop $HowToFindMessage
-
- ${NSD_CreateDirRequest} 0 80% 75% 12u ""
- Pop $SNF_SearchFor_LocationB
- SendMessage $SNF_SearchFor_LocationB ${WM_SETTEXT} 0 "STR:$SNF_StartLookingHere"
-
- ${NSD_CreateBrowseButton} 340 80% 8% 12u "..."
- Pop $SNF_SearchFor_Location_ButtonB
- ${NSD_OnClick} $SNF_SearchFor_Location_ButtonB LocateSNFInstallFolder
-
- StrCmp $SNF_StartLookingHere "" +3 0
- StrCpy $Compound_Enable1 "1"
-
- Call check_CompoundEnable
-
-
- nsDialogs::Show
- return
-
-
- NoIceWarpFound:
- ${NSD_CreateLabel} 0 40 100% 80 "IceWarp was not reliably installed. Either the registry keys do not exist, or The Content.XML file does not exist in the Merak\config\ folder."
- Pop $0
- nsDialogs::Show
- return
-
- NoAlligateFound:
- ${NSD_CreateLabel} 0 40 100% 80 "Alligate was not reliably installed. Registry keys do not exist. Please go back and select another install option."
- Pop $0
- nsDialogs::Show
- return
-
- NoImailFound:
- ${NSD_CreateLabel} 0 40 100% 80 "IMail was not reliably installed. Registry keys do not exist. Please go back and select another install option."
- Pop $0
- nsDialogs::Show
- return
-
- NoSmarterMail:
- ${NSD_CreateLabel} 0 40 100% 80 "Smartermail was not reliably installed. Registry keys do not exist. Please go back and select another install option."
- Pop $0
- nsDialogs::Show
- return
- NoMDaemon:
- ${NSD_CreateLabel} 0 40 100% 80 "MDaemon was not reliably installed or registry keys do not exist. Please go back and select another install option."
- Pop $0
- nsDialogs::Show
- return
-
-
- FunctionEnd
-
-
-
-
-
-
- Function LocateIceWarpFolder
-
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindApplicationMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- ifFileExists "$R0\config\content.xml" enableNext 0
- MessageBox MB_OK "Unable to locate 'config\content.xml' in this selected folder. Please select the folder where [folder]\config\content.xml will resolve."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
- enableNext:
- StrCpy $IceWarpInstallFolder $R0
-
-
- StrCpy $Compound_Enable2 "1"
- call check_CompoundEnable
- return
- FunctionEnd
-
- Function LocateKerioFolder
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:Kerio Not Supported yet."
- MessageBox MB_OK "Kerio is not yet supported."
- FunctionEnd
-
- Function LocateMailSiteFolder
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:MailSite Not Supported yet."
- MessageBox MB_OK "MailSite is not yet supported."
- FunctionEnd
-
- Function LocateSNFInstallFolder
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindINSTDIRMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_LocationB ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- StrCmp $R0 "" 0 testNext
- EnableWindow $NextButton "0"
- StrCpy $Compound_Enable1 "0"
- return
- testNext:
-
-
- ifFileExists "$R0\SNFClient.exe" 0 testForOldSniffer
- StrCpy $INSTDIR $R0
- Goto enableNext
- testForOldSniffer:
- ifFileExists "$R0\snf2check.exe" 0 useThisFolder
- StrCpy $INSTDIR $R0
- Goto enableNext
- useThisFolder:
-
- ${GetParent} $R0 $R1
- ifFileExists "$R1\SNF\*.*" 0 +3
- StrCpy $INSTDIR $R0
- Goto EnableNext
- ifFileExists "$R1\Sniffer\*.*" 0 +3
- StrCpy $INSTDIR $R0
- Goto EnableNext
-
-
- StrCpy $INSTDIR "$R0\SNF"
- CreateDirectory $INSTDIR
-
- enableNext:
- SendMessage $SNF_SearchFor_LocationB ${WM_SETTEXT} 0 "STR:$INSTDIR"
-
- StrCpy $Compound_Enable1 "1"
- Call check_CompoundEnable
-
- return
- FunctionEnd
-
- Function LocateSNF4AlligateFolder
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindApplicationMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- ifFileExists "$R0\AGFiltSvc.exe" enableNext 0
- MessageBox MB_OK "Unable to locate 'AGFiltSvc.exe' in the selected folder. Please select the folder where Alligate's AGFiltSvc.exe exists."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
- enableNext:
- StrCpy $SNF4AlligateInstallFolder $R0
- ifFileExists "$SNF4AlligateInstallFolder\SNF4Alligate.exe" 0 +2
- StrCpy $IsMINIMIInstalled "1"
-
-
- StrCpy $Compound_Enable2 "1"
- call check_CompoundEnable
- return
- FunctionEnd
-
- Function LocateMINIMIFolder
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindApplicationMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- ifFileExists "$R0\SMTP32.exe" enableNext 0
- MessageBox MB_OK "Unable to locate 'SMTP32.exe' in the selected folder. Please select the folder where IMails SMTP32.exe exists."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
- enableNext:
- StrCpy $MINIMIInstallFolder $R0
- ifFileExists "$MINIMIInstallFolder\SNFIMailShim.exe" 0 +2
- StrCpy $IsMINIMIInstalled "1"
-
-
- StrCpy $Compound_Enable2 "1"
- call check_CompoundEnable
- return
- FunctionEnd
-
-
- Function LocateMDaemonFolder
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindApplicationMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- ifFileExists "$R0\SpamAssassin\rules\*.*" nextTest 0
- MessageBox MB_OK "Unable to locate the Spam Assassin rules folder in the chosen MDaemon install location. Please select the root MDaemon Folder."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
- nextTest:
- ifFileExists "$R0\app\MDaemon.exe" enableNext 0
- MessageBox MB_OK "Unable to locate the [Root]\App\MDaemon.exe folder in the chosen MDaemon install location. Please select the root MDaemon Folder."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
-
- enableNext:
- StrCpy $MXGuardInstallFolder $R0
- StrCpy $IsMXGuardInstalled "1"
- StrCpy $Compound_Enable2 "1"
- call check_CompoundEnable
- return
- FunctionEnd
-
-
- Function LocateMXGuardFolder
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindApplicationMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- ifFileExists "$R0\mxguard.ini" enableNext 0
- MessageBox MB_OK "Unable to locate 'mxguard.ini' in the selected folder. Please select the folder where MXGuards .ini file resides."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
- enableNext:
- StrCpy $MXGuardInstallFolder $R0
- StrCpy $IsMXGuardInstalled "1"
- StrCpy $Compound_Enable2 "1"
- call check_CompoundEnable
- return
- FunctionEnd
-
-
-
-
- Function LocateDecludeFolder
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindApplicationMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- ifFileExists "$R0\global.cfg" enableNext 0
- MessageBox MB_OK "Unable to locate 'global.cfg' in the selected folder. Please select the folder where Decludes global.cfg resides."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
- enableNext:
- StrCpy $DecludeInstallFolder $R0
- StrCpy $IsDecludeInstalled "1"
- StrCpy $Compound_Enable2 "1"
- call check_CompoundEnable
- return
- FunctionEnd
-
-
- Function LocateSmarterMailFolder
- nsDialogs::SelectFolderDialog /NOUNLOAD $FindApplicationMessage $R0
- Pop $R0
-
- ${If} $R0 != error
-
-
- SendMessage $SNF_SearchFor_Location ${WM_SETTEXT} 0 "STR:$R0"
- ${EndIf}
-
- ifFileExists "$R0\global.cfg" enableNext 0
- MessageBox MB_OK "Unable to locate 'global.cfg' in the selected folder. Please select the folder where Decludes global.cfg resides."
- StrCpy $Compound_Enable2 "0"
- call check_CompoundEnable
- return
- enableNext:
- StrCpy $DecludeInstallFolder $R0
- StrCpy $IsDecludeInstalled "1"
- StrCpy $Compound_Enable2 "1"
- call check_CompoundEnable
- return
-
- FunctionEnd
-
-
-
-
-
-
-
|