|
|
1.1 root 1: ;***********************************************************************
2: ;
3:
4:
5:
6: ;
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23: ; NTLANMAN.INF
24: ;
25: ; This is the Network Setup INF for NT/Lanman installation.
26: ;
27: ; Usage:
28: ; NORMAL: This file is "shelled" from SETUP.INF during
29: ; main installation.
30: ;
31: ; Warning:
32: ;
33: ; This file is processed by that work of wonder, RCPP, into
34: ; three separate files: NTLANMAN.INF, NTIDWNET.INF
35: ; and NTLMINST.INF. Because of this, some spurious errors are
36: ; occasionally emitted due
37: ; to the 'C' syntax knowledge of RCPP. For this reason, some
38: ; comments dont use apostrophes and ellipses have been avoided.
39: ; Other errors, such as escaped quotes, are unavoidable.
40: ;
41:
42: ;
43: ; History:
44: ; davidhov 10-Mar-1992 Created
45: ;
46: ;
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87: ;***********************************************************************
88: ; CONSTANTS FOR USING DIALOGS
89: ;***********************************************************************
90: [GeneralConstants]
91:
92: Exit_Code = 0
93: BillboardVisible = 0
94: ;
95: ; Return codes; Exit_Code is set to one of these
96: ;
97: ExitCodeOk = 0
98: ExitCodeCancel = 1
99: ExitCodeFatal = 2
100: ;
101: ; Program flow control variables.
102: ;
103: retaddr = ""
104: callresult = 0
105: from = ""
106: to = ""
107: ;
108: ; Location of netcard product information
109: ;
110: NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
111: KeyNull = ""
112: MAXIMUM_ALLOWED = 33554432
113: SERVICE_NO_CHANGE = 4294967295
114: KeyInfo = {}
115: NoTitle = 0
116: UtilityInf = "UTILITY.INF"
117: NcParamInf = "NCPARAM.INF"
118: RasAutoInstall = 0
119:
120: !STF_DOMAIN_ROLE = STANDALONE
121: !STF_DOMAIN = ""
122: !STF_SRCDIR_WINNT = ""
123:
124: [DialogConstants]
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143: ;
144: ; Common button names, etc.
145: ;
146: Help = "&Help"
147: Exit = "Cancel"
148: HelpContext = ""
149: Continue = "Continue"
150: ExitState = "Active"
151: Cancel = "Cancel"
152: ;
153: ; Constants to support the use of radio button dialogs
154: ;
155: Radio1 = "1"
156: Radio2 = "2"
157: Radio3 = "3"
158: Radio4 = "4"
159: Radio5 = "5"
160: Radio6 = "6"
161: Radio7 = "7"
162: Radio8 = "8"
163: Radio9 = "9"
164: ;
165: ; Constants to support the use of checkbox dialogs
166: ;
167: ; DON'T TRANSLATE -- Internal use only
168: ;
169: Chosen = "ON"
170: NotChosen = "OFF"
171:
172: NullFileName = "NOSUCH.FIL"
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237: ;***********************************************************************
238: ; ERROR MESSAGE CONSTANTS-- Language-dependent
239: ;***********************************************************************
240: [ErrorConstants]
241: ;
242: ; Error handling variables
243: ;
244: RegistryErrorList = ^(RegistryErrors$(!STF_LANGUAGE),1)
245: RegistryErrorIndex = 1
246:
247: ;------------------------------------------------------------------
248: ; UI VARIABLES
249: ; these variables are initialised with defaults, detected from the
250: ; system configuration and/or queried from the user. the variables
251: ; are language independent.
252: ;------------------------------------------------------------------
253:
254: [UiVars]
255: DummyUnsedUiVar = ""
256:
257: ;**************************************************************************
258: ; Network UI Variables
259: ;**************************************************************************
260: [DestNetPathNames]
261: DEST_NET_DRIVER = $(!STF_NTPATH)\drivers
262: DEST_NET_PROTOCOL = $(!STF_NTPATH)\drivers
263: DEST_NET_EXE = $(!STF_WINDOWSSYSPATH)
264: DEST_NET_INF = $(!STF_WINDOWSSYSPATH)
265: DEST_NET_DLL = $(!STF_WINDOWSSYSPATH)
266:
267: ;
268: ; Instantiate the platform dependent lists
269: ;
270: [NetworkVars]
271: ;
272: ; Global variables which would otherwise be supplied by NCPASHEL.INF
273: ;
274: !STF_SRCDIR_KEYED = "" ; source dir as entered
275: !STF_SRCDIR_USED = "" ; source dir as used
276: !STF_SRCDIR_OVERRIDE = "" ; OEM source path
277: !NTN_RegBase = ""
278: !NTN_ServiceBase = "SYSTEM\CurrentControlSet\SERVICES"
279: !NTN_SoftwareBase = "SOFTWARE"
280: !NTN_InstallMode = "install"
281: !NTN_Origination = "install"
282: !NTN_InstallPhase = "primary"
283:
284: ;
285: ; Set up the default lists for services and protocols
286: ;
287: ServiceInfList = ^(ServiceData, 1)
288: ServiceOptionList = ^(ServiceData, 2)
289: ServiceBbList = ^(ServiceData,3)
290: ServiceNameList = ^(ServiceData,4)
291:
292: ProtoInfList = ^(ProtoData, 1)
293: ProtoOptionList = ^(ProtoData, 2)
294: ProtoBbList = ^(ProtoData, 3)
295: ProtoNameList = ^(ProtoData, 4)
296:
297: ;
298: ; SERVICE and PROTOCOL INF lists.
299: ;
300: ; Format: <name of INF to run>,<option to install>,<billboard index>
301: ;
302: ; Default NetBIOS transport INF: NetBeui (NBF.SYS)
303: ;
304: [ProtoData]
305: ProtoData_1 = "OEMNXPNB.INF","NBF",4,Nbf
306: ;
307: ; NT LM service INFs. Files is this list are "shelled" to, along with
308: ; the appropriate protocol INF and netcard INF.
309: ;
310: [ServiceData]
311: ; Server service
312: ServiceData_1 = "OEMNSVSV.INF","SRV",3,LanmanServer
313: ; Workstation service
314: ServiceData_2 = "OEMNSVWK.INF","WKSTA",2,LanmanWorkstation
315: ; NetBIOS API support
316: ServiceData_3 = "OEMNSVNB.INF","NETBIOS",5,NetBIOS
317: ; RPC API support
318: ServiceData_4 = "OEMNSVRP.INF","RPCLOCATE",11,RPCLOCATOR
319:
320: [RasServiceData]
321: RAS_InfName = "OEMNSVRA.INF"
322: RAS_Option = "RAS"
323: RAS_Billboard = 12
324: RAS_Service = "RAS"
325:
326:
327: ;**************************************************************************
328: ;**************************************************************************
329: ;
330: ; SHELL COMMANDS SECTION
331: ;
332: ;**************************************************************************
333: ;**************************************************************************
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672: [DoNetwork]
673:
674: Set !G:DebugOutputControl = 0
675:
676: Debug-Output "NTLANMAN.INF: Section: Shell Commands"
677:
678: Set NetInstallStatus = STATUS_SUCCESSFUL
679:
680: set-subst LF = "\n"
681:
682: StartWait
683: ;
684: ; read general constants, etc.
685: ;
686: read-syms GeneralConstants
687:
688: Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
689: read-syms ProductTitleLanmanNt$(!STF_LANGUAGE)
690: Else
691: read-syms ProductTitleWinNt$(!STF_LANGUAGE)
692: Endif
693: Debug-Output "NTLANMAN.INF: Product title is: "$(!NetProductTitle)
694: set-title $(!NetProductTitle)" Network Installation"
695:
696: read-syms UiVars
697: read-syms DestNetPathNames
698: read-syms DialogConstants
699: read-syms NetworkVars
700: read-syms ProgressCopy$(!STF_LANGUAGE)
701:
702: Set !STF_IDW = FALSE
703:
704: Debug-Output "NTLANMAN.INF: Base variables loaded"
705:
706: LoadLibrary "x" $(!STF_CWDDIR)\setupdll.dll !LIBHANDLE
707:
708: Debug-Output "NTLANMAN.INF: Successfully linked to SETUPDLL.DLL"
709:
710: LoadLibrary "x" $(!STF_CWDDIR)\ncpa.cpl !NCPA_HANDLE
711:
712: Debug-Output "NTLANMAN.INF: Successfully linked to NCPA.CPL"
713:
714: Shell "subroutn.inf" ReadSetupHelpIds
715: SetHelpFile "setupnt.hlp" $(!MinimumID) $(!MaximumID)
716:
717: EndWait
718:
719: Debug-Output "NTLANMAN.INF: Network variables loaded"
720:
721: ;
722: ; To support WINNT setup, record STF_SRCDIR into the Registry.
723: ; If present, this is used as an override to the "SourcePath"
724: ; value SETUP normally records. The problem is that the "SourcePath"
725: ; is a lie for WINNT setup-- it always points at "A:\", not to the
726: ; hidden temporary directory.
727: ;
728: OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\Setup" $(MAXIMUM_ALLOWED) KeySetup
729: Ifstr(i) $(KeySetup) != ""
730: SetRegValue $(KeySetup) {WinntPath,$(NoTitle),$(!REG_VT_SZ),$(!STF_SRCDIR)}
731: CloseRegKey $(KeySetup)
732: Debug-Output "NTLANMAN.INF: Setup\WinntPath value set to: "$(!STF_SRCDIR)
733: Endif
734:
735:
736:
737: ;------------------------------------------------------------------------
738: ;
739: ; NETCARD INSTALLATION
740: ;
741: ; Since detection is always activated merely by shelling to
742: ; [InitialAdapterInstall], we just call the INF OEMHOOK.INF.
743: ; This file, normally absent, allows vendors to copy files,
744: ; manipulate the Registry, etc., to prepare for netcard operations.
745: ;
746: ;------------------------------------------------------------------------
747:
748: ;
749: ; Get global variables set up and enable detection.
750: ;
751: Shell $(NcParamInf) Param_SetGlobals
752: Set !STF_NCDETECT = YES
753:
754: ; Silently run the INF called OEMHOOK.INF if there is one.
755:
756: Shell "" InstallOemHook
757:
758: Debug-Output "NTLANMAN.INF: Establish netcard option"
759:
760: set retaddr = nphase$runinfs
761: goto netgetdriver
762:
763: nphase$runinfs = +
764: Debug-Output "NTLANMAN.INF: Run subordinate INFs"
765:
766: Set retaddr = nphase$installfiles
767: Goto netruninfs
768: ;
769: ; Add all the networking files to the install list and
770: ; copy them.
771: ;
772: nphase$installfiles = +
773: Set retaddr = nphase$ncpacmdline
774:
775: Ifstr(i) $(!STF_IDW) != "TRUE"
776: Goto netinstallfiles
777: Endif
778:
779: ;
780: ; Create the NCPA command line parameters
781: ;
782: nphase$ncpacmdline = +
783: Set retaddr = nphase$runncpa
784: Goto netncpacmdline
785: ;
786: ; Run the NCPA to configure the network
787: ;
788: nphase$runncpa = +
789: ;
790: ; Does ActiveComputerName exist? If so, stomp on it.
791: ;
792: Set KeyComputerName = $(KeyNull)
793: OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" $(MAXIMUM_ALLOWED) KeyComputerName
794:
795: Ifstr(i) $(KeyComputerName) != $(KeyNull)
796: GetRegValue $(KeyComputerName) "ComputerName" ValueActiveComputerName
797: Set ActiveComputerName = *($(ValueActiveComputerName),4)
798: Debug-Output "NTLANMAN.INF: *************************************"
799: Debug-Output "NTLANMAN.INF: ActiveComputerName key exists: "$(ActiveComputerName)
800: SetRegValue $(KeyComputerName) {ComputerName,$(NoTitle),$(!REG_VT_SZ),$(!STF_COMPUTERNAME)}
801: Debug-Output "NTLANMAN.INF: ActiveComputerName was set to: "$(!STF_COMPUTERNAME)
802: Debug-Output "NTLANMAN.INF: *************************************"
803: CloseRegKey $(KeyComputerName)
804: Else
805: Debug-Output "NTLANMAN.INF: ActiveComputerName key does not exist."
806: Endif
807:
808: Debug-Output "NTLANMAN.INF: Run NCPA to configure the network"
809: Ifint $(BillboardVisible) != 0
810: Shell "subroutn.inf" PopBillboard
811: Set BillboardVisible = 0
812: Endif
813: set retaddr = nphase$startnet
814: goto netrunncpa
815: ;
816: ; Start the network (workstation, rdr, xport, driver)
817: ;
818: nphase$startnet = +
819: Debug-Output "NTLANMAN.INF: Run NCPA to start the network"
820:
821: read-syms Billboard6$(!STF_LANGUAGE)
822: Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
823: Set BillboardVisible = 1
824:
825: Set retaddr = nphase$domainrole
826: Goto netstartnetwork
827: ;
828: ; Determine this machine's role in the network
829: ;
830: nphase$domainrole = +
831: Debug-Output "NTLANMAN.INF: Run NCPA to establish domain"
832: Ifint $(BillboardVisible) != 0
833: Shell "subroutn.inf" PopBillboard
834: Set BillboardVisible = 0
835: Endif
836:
837: set retaddr = nphase$connectshare
838: goto netdomain
839: ;
840: ; Connect to a remote sharepoint if necessary
841: ;
842: nphase$connectshare = +
843: ;
844: ; connecting to a remote share is not necessary... in initial setup we don't
845: ; have unc shares.
846: ;
847:
848: Debug-Output "NTLANMAN.INF: Domain Role = "$(!STF_DOMAIN_ROLE)
849: Set retaddr = nphase$done
850: Debug-Output "NTLANMAN.INF: NOT connecting to remote sharepoint"
851: Goto $(retaddr)
852: ;
853: ; That's all for now...
854: ;
855: nphase$done = +
856: Debug-Output "NTLANMAN.INF: Done ************************"
857: ;
858: ; Remove the billboard, if any
859: ;
860: Ifint $(BillboardVisible) != 0
861: Shell "subroutn.inf" PopBillboard
862: Set BillboardVisible = 0
863: Endif
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:
924:
925:
926:
927:
928:
929:
930:
931:
932:
933:
934:
935:
936:
937:
938:
939:
940:
941:
942:
943:
944:
945:
946:
947:
948:
949:
950:
951:
952:
953:
954:
955:
956:
957:
958:
959:
960:
961:
962:
963:
964:
965:
966:
967:
968:
969:
970:
971:
972:
973:
974:
975:
976:
977:
978:
979:
980:
981:
982:
983:
984:
985:
986:
987:
988:
989:
990:
991:
992:
993:
994:
995:
996:
997:
998:
999:
1000:
1001:
1002:
1003:
1004:
1005:
1006:
1007:
1008:
1009:
1010:
1011:
1012:
1013:
1014:
1015:
1016:
1017:
1018:
1019:
1020:
1021:
1022:
1023:
1024:
1025:
1026:
1027:
1028:
1029:
1030:
1031:
1032:
1033:
1034:
1035:
1036:
1037:
1038:
1039:
1040:
1041:
1042:
1043:
1044:
1045:
1046:
1047:
1048:
1049:
1050:
1051:
1052:
1053:
1054:
1055:
1056:
1057:
1058:
1059:
1060:
1061:
1062:
1063:
1064:
1065:
1066:
1067:
1068:
1069:
1070:
1071:
1072:
1073: ;
1074: ; Discard the Billboard dialog if still present
1075: ;
1076: Ifint $(BillboardVisible) != 0
1077: Shell "subroutn.inf" PopBillboard
1078: Set BillboardVisible = 0
1079: Endif
1080:
1081: Goto end
1082:
1083: ;===========================================================================
1084: ;===========================================================================
1085: ;===========================================================================
1086: ;
1087: ; Worker functions.
1088: ;
1089: ;===========================================================================
1090: ;===========================================================================
1091: ;===========================================================================
1092:
1093: ;****************************************************************
1094: ;
1095: ; Install all files in copy list.
1096: ;
1097: ;****************************************************************
1098:
1099: netinstallfiles = +
1100:
1101:
1102: Shell "initial.inf" ControlBitmaps START
1103:
1104:
1105: Debug-Output "NTLANMAN.INF: Installing all files in copy list"
1106: Install Install-All-Files-Now
1107:
1108:
1109: Shell "initial.inf" ControlBitmaps STOP
1110:
1111:
1112: goto $(retaddr)
1113:
1114: ;****************************************************************
1115: ;
1116: ; Build the command line parameters for the NCPA exports
1117: ;
1118: ;****************************************************************
1119: netncpacmdline = +
1120: ;
1121: ; Build the command line paramters for the NCPA's calls to SETUP
1122: ;
1123: Set NCPA_CMD_LINE = " /t STF_PRODUCT = "$(!STF_PRODUCT)
1124: Set NCPA_CMD_LINE = " /t STF_COMPUTERNAME = """$(!STF_COMPUTERNAME)""""$(NCPA_CMD_LINE)
1125: Set NCPA_CMD_LINE = " /t STF_USERNAME = """$(!STF_USERNAME)""""$(NCPA_CMD_LINE)
1126: Set NCPA_CMD_LINE = " /t STF_INSTALL_MODE = "$(!STF_INSTALL_MODE)$(NCPA_CMD_LINE)
1127: Set NCPA_CMD_LINE = " /t STF_SRCDIR = "$(!STF_SRCDIR)$(NCPA_CMD_LINE)
1128:
1129: Ifstr(i) $(!STF_IDW) == TRUE
1130: Set NCPA_CMD_LINE = " /t STF_IDW = "$(!STF_IDW)$(NCPA_CMD_LINE)
1131: Endif
1132:
1133: goto $(retaddr)
1134:
1135: ;****************************************************************
1136: ;
1137: ; Run the NCPA.CPL in "NCPA" mode; i.e., cause network binding,
1138: ; OEM installation, etc.
1139: ;
1140: ;****************************************************************
1141: netrunncpa = +
1142:
1143: StartDetachedProcess STATUS "" "" $(!STF_WINDOWSSYSPATH)"\spoolss.exe"
1144: ifstr(i) $(STATUS) != "ERROR"
1145: set !STF_START_SPOOLSS = "NO"
1146: endif
1147:
1148: ;
1149: ; Run the NCPA, giving it the proper information: the window handle
1150: ; of the main SETUP window, the function to run ("NCPA"), and
1151: ; the parameters to use for dialogs and subordinate SETUP invocation.
1152: ;
1153: Set NCPA_FUNC = NCPA
1154:
1155: goto netcallncpa
1156:
1157: netstartservice = +
1158: ;
1159: ; Call the NCPA's StartService wrapper. It allows passing of parameters,
1160: ; but we currently don't need this capability.
1161: ;
1162: Debug-Output "NTLANMAN.INF: calling NCPA.CPL to start service "$(NCPA_SERVICE)
1163:
1164: LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, $(NCPA_SERVICE)
1165: Goto netreturnncpa
1166:
1167: netcallncpa = +
1168: ;
1169: ; Call the NCPA.CPL. There are three standard parameters:
1170: ;
1171: ; [0] ASCII form of LONG window handle
1172: ; [1] ASCII name of NCPA.CPL function to perform
1173: ; [2] command line to pass to NCPA and subordinate INFs
1174: ;
1175: ;
1176: Debug-Output "NTLANMAN.INF: calling NCPA.CPL, function "$(NCPA_FUNC)
1177:
1178: LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE),CPlSetup $(!STF_HWND), $(NCPA_FUNC), $(NCPA_CMD_LINE)
1179:
1180: netreturnncpa = +
1181:
1182: Set NCPA_STATUS = *($(NCPA_RESULT),1)
1183: Debug-Output "NTLANMAN.INF: NCPA Status was: "$(NCPA_STATUS)
1184: goto $(retaddr)
1185:
1186: ;****************************************************************
1187: ;
1188: ; Start the Network: start LanmanWorkstation and LMHOSTS if it exists
1189: ;
1190: ;****************************************************************
1191: netstartnetwork = +
1192: Debug-Output "NTLANMAN.INF: Starting workstation..."
1193: StartWait
1194: Set WaitStarted = 1
1195: Set FLibraryErrCtl = 1
1196:
1197: LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, LanmanWorkstation
1198:
1199: Set NCPA_STATUS = *($(NCPA_RESULT),1)
1200:
1201: Debug-Output "NTLANMAN.INF: Start workstation; result was: "$(NCPA_STATUS)
1202:
1203: Ifint $(NCPA_STATUS) != 0
1204: EndWait
1205: Set WaitStarted = 0
1206:
1207: LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), ERRORMSG, $(NCPA_STATUS)
1208:
1209: Set NCPA_ERROR_MESSAGE = *($(NCPA_RESULT),2)
1210: Debug-Output "NTLANMAN.INF: Error "$(NCPA_STATUS)" translated to: "$(NCPA_ERROR_MESSAGE)
1211: Read-syms WarningNoNet$(!STF_LANGUAGE)
1212: Set Error = $(NCPA_ERROR_MESSAGE)$(ErrorSuffix)
1213: read-syms WarningDlg$(!STF_LANGUAGE)
1214: ui start SetupMessage
1215: goto netstartnetdone
1216: Endif
1217:
1218: Debug-Output "NTLANMAN.INF: Starting LMHOSTS service..."
1219:
1220: ;
1221: ; Start LMHOSTS service if it exists
1222: ;
1223: OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\LmHosts" $(MAXIMUM_ALLOWED) KeyLmHosts
1224: ifstr(i) $(KeyLmHosts) != ""
1225: EndWait
1226: Set WaitStarted = 0
1227:
1228: LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, LmHosts
1229:
1230: Set NCPA_STATUS = *($(NCPA_RESULT),1)
1231:
1232: Debug-Output "NTLANMAN.INF: Start Lmhosts; result was: "$(NCPA_STATUS)
1233:
1234: Ifint $(NCPA_STATUS) != 0
1235: LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), ERRORMSG, $(NCPA_STATUS)
1236: Set NCPA_ERROR_MESSAGE = *($(NCPA_RESULT),2)
1237: Debug-Output "NTLANMAN.INF: Error "$(NCPA_STATUS)" translated to: "$(NCPA_ERROR_MESSAGE)
1238: Read-syms WarningNoLmHosts$(!STF_LANGUAGE)
1239: Set Error = $(NCPA_ERROR_MESSAGE)$(ErrorSuffix)
1240: read-syms WarningDlg$(!STF_LANGUAGE)
1241: ui start SetupMessage
1242: goto netstartnotdone
1243: Endif
1244: Endif
1245:
1246: netstartnetdone =+
1247:
1248: Set FLibraryErrCtl = 0
1249: Ifint $(WaitStarted) == 1
1250: EndWait
1251: Endif
1252:
1253:
1254:
1255: Goto $(retaddr)
1256:
1257: ;****************************************************************
1258: ;
1259: ; Run NCPA.CPL in "DOMAIN" mode; i.e., establish domain
1260: ; role, security info, etc.,
1261: ;
1262: ; The DOMAIN subfunction returns a string (NCPA_RESULT) in
1263: ; the following format:
1264: ;
1265: ; { <numeric error code>,
1266: ; COMPUTERNAME,
1267: ; DOMAINNAME,
1268: ; LOGONPASSWORD,
1269: ; COMPUTERROLE
1270: ; }
1271: ;****************************************************************
1272: netdomain = +
1273: Debug-Output "NTLANMAN.INF: Running Domain Settings dialog..."
1274:
1275: Set FLibraryErrCtl = 1
1276:
1277: LibraryProcedure NCPA_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), DOMAIN, $(NCPA_CMD_LINE)
1278:
1279: Set FLibraryErrCtl = 0
1280:
1281: Set NCPA_STATUS = *($(NCPA_RESULT),1)
1282:
1283: Debug-Output "NTLANMAN.INF: Domain Settings result was: "$(NCPA_STATUS)
1284:
1285: Ifint $(NCPA_STATUS) != 0
1286: ;
1287: ; Check for IDS_NCPA_SETUP_CANCELLED. If so, and LanmanNT,
1288: ; discontinue installation.
1289: ;
1290: Ifint $(NCPA_STATUS) == 13074
1291: Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
1292: Debug-Output "NTLANMAN.INF: Aborting LanmanNT installation; user cancellation."
1293: Set NetInstallStatus = STATUS_USERCANCEL
1294: Goto setupnotdone
1295: Endif
1296: Endif
1297: Endif
1298:
1299: ;
1300: ; Check the return variable, and update globals with new
1301: ; information derived from domain installation process.
1302: ;
1303: Set TEMP_COMPUTERNAME = *($(NCPA_RESULT),2)
1304: Set TEMP_DOMAINNAME = *($(NCPA_RESULT),3)
1305: Set TEMP_COMPUTERROLE = *($(NCPA_RESULT),5)
1306:
1307: Ifstr(i) $(TEMP_COMPUTERNAME) != ""
1308: Ifstr(i) $(TEMP_COMPUTERNAME) != $(!STF_COMPUTERNAME)
1309: Set !STF_COMPUTERNAME = $(TEMP_COMPUTERNAME)
1310: Debug-Output "NTLANMAN.INF: Computername changed to "$(!STF_COMPUTERNAME)
1311: Endif
1312: Endif
1313: Ifstr(i) $(TEMP_DOMAINNAME) != ""
1314: Set !STF_DOMAIN = $(TEMP_DOMAINNAME)
1315: Debug-Output "NTLANMAN.INF: Domain name is "$(!STF_DOMAIN)
1316: Endif
1317: Ifstr(i) $(TEMP_COMPUTERROLE) != ""
1318: Set !STF_DOMAIN_ROLE = $(TEMP_COMPUTERROLE)
1319: Debug-Output "NTLANMAN.INF: Domain role is "$(!STF_DOMAIN_ROLE)
1320: Endif
1321: ;
1322: ; Check to see if TEMP_COMPUTERROLE is STANDALONE. If so, alter the NetLogon
1323: ; service to be startable on demand (not auto-started).
1324: ;
1325: Ifstr(i) $(TEMP_COMPUTERROLE) == STANDALONE
1326: Debug-Output "NTLANMAN.INF: Prevent NETLOGON service from autostarting"
1327: LibraryProcedure DontCare, $(!LIBHANDLE), SetupChangeServiceConfig, NetLogon,+
1328: $(SERVICE_NO_CHANGE), 3, $(SERVICE_NO_CHANGE), "", "", "", "", "", ""
1329: Endif
1330:
1331: goto $(retaddr)
1332: ;****************************************************************
1333: ;
1334: ; Get Primary Adapter Type
1335: ;
1336: ;****************************************************************
1337: netgetdriver = +
1338: Debug-Output "NTLANMAN.INF: Label: netgetdriver"
1339:
1340: Shell "" InitialAdapterInstall
1341:
1342: Set NetInstallStatus = $($R0)
1343:
1344: Ifstr(i) $(NetInstallStatus) == STATUS_WANTRAS
1345: Set NetInstallStatus = STATUS_SUCCESSFUL
1346: Set RasAutoInstall = 1
1347: Debug-Output "NTLANMAN.INF: RAS auto-installation chosen"
1348: Endif
1349:
1350: Debug-Output "NTLANMAN.INF: netgetdriver; returning: "$(NetInstallStatus)
1351:
1352: ;****************************************************************
1353: ;
1354: ; See if user has cancelled; exit if so. Convert EXITNET to
1355: ; SUCCESSFUL if this is main installation.
1356: ;
1357: ;****************************************************************
1358: netcheckquit = +
1359: Debug-Output "NTLANMAN.INF: netcheckquit original status: "$(NetInstallStatus)
1360:
1361: Set UserChoiceList = {"STATUS_SUCCESSFUL",+ ; all is well
1362: "STATUS_USERCANCEL",+ ; user wants to exit completely
1363: "STATUS_EXITNET",+ ; user wants no network
1364: "STATUS_FAILED"} ; things are dismal
1365:
1366: Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
1367: Set InfReturnList = {"STATUS_SUCCESSFUL",+ ; SUCCESSFUL -> SUCCESSFUL
1368: "STATUS_USERCANCEL",+ ; USERCANCEL -> USERCANCEL
1369: "STATUS_SUCCESSFUL",+ ; EXITNET -> SUCCESSFUL
1370: "STATUS_FAILED"} ; FAILED -> FAILED
1371: Set LabelList = {$(retaddr),setupnotdone,setupnotdone,setupnotdone}
1372: Else
1373: Set InfReturnList = {"STATUS_SUCCESSFUL",+ ; SUCCESSFUL -> SUCCESSFUL
1374: "STATUS_USERCANCEL",+ ; USERCANCEL -> USERCANCEL
1375: "STATUS_USERCANCEL",+ ; EXITNET -> USERCANCEL
1376: "STATUS_FAILED"} ; FAILED -> FAILED
1377: Set LabelList = {$(retaddr),setupnotdone,nphase$done,setupnotdone}
1378: Endif
1379:
1380:
1381:
1382:
1383:
1384:
1385: ; Set the user's choice index
1386:
1387: Set UserChoice = ~($(UserChoiceList),$(NetInstallStatus))
1388: Ifint $(UserChoice) == 0
1389: ; Default to "STATUS_FAILED" if unintelligible
1390: Debug-Output "NTLANMAN.INF: netcheckquit defaulting status to STATUS_FAILED"
1391: Set UserChoice = 4
1392: Endif
1393:
1394: ; Set the return value and return point based on status
1395:
1396: Set NetInstallStatus = *($(InfReturnList),$(UserChoice))
1397: Set UserRetAddr = *($(LabelList),$(UserChoice))
1398:
1399: Debug-Output "NTLANMAN.INF: netcheckquit status: "$(NetInstallStatus)", label: "$(UserRetAddr)
1400:
1401: Goto $(UserRetAddr)
1402:
1403:
1404: ;****************************************************************
1405: ;
1406: ; Run the Subordinate INFs
1407: ;
1408: ; Execute all the necessary component INFs. First, run the adapter
1409: ; INF, then the protocol INF. After, run all the NT LM service INFs
1410: ;
1411: ;****************************************************************
1412: netruninfs = +
1413:
1414: Debug-Output "NTLANMAN.INF: Label: netruninfs"
1415:
1416: Set InfsToBeRun = {}
1417: Set OptionsToInstall = {}
1418: Set BbToBeShown = {}
1419: Set SvcNameList = {}
1420: Set AdapterSrcDir = $(!STF_SRCDIR)
1421:
1422: ForListDo $(ProtoInfList)
1423: Set InfsToBeRun = >($(InfsToBeRun),$($))
1424: Set OptionsToInstall = >($(OptionsToInstall),*($(ProtoOptionList),$(#)))
1425: Set BbToBeShown = >($(BbToBeShown),*($(ProtoBbList),$(#)))
1426: EndForListDo
1427:
1428: ForListDo $(ServiceInfList)
1429: Set InfsToBeRun = >($(InfsToBeRun),$($))
1430: Set OptionsToInstall = >($(OptionsToInstall),*($(ServiceOptionList),$(#)))
1431: Set BbToBeShown = >($(BbToBeShown),*($(ServiceBbList),$(#)))
1432: EndForListDo
1433:
1434: ;
1435: ; If selected, append the RAS tokens to the extant lists
1436: ;
1437: Ifint $(RasAutoInstall) == 1
1438: Debug-Output "NTLANMAN.INF: Preparing RAS for installation"
1439: read-syms RasServiceData
1440: Set InfsToBeRun = >($(InfsToBeRun),$(RAS_InfName))
1441: Set OptionsToInstall = >($(OptionsToInstall),$(RAS_Option))
1442: Set BbToBeShown = >($(BbToBeShown),$(RAS_Billboard))
1443: Endif
1444:
1445: Debug-Output "NTLANMAN.INF: INFs to be run: "$(InfsToBeRun)
1446: Debug-Output "NTLANMAN.INF: Options to install: "$(OptionsToInstall)
1447: Debug-Output "NTLANMAN.INF: Billboards to be shown: "$(BbToBeShown)
1448: ;
1449: ; The list of INFs is now complete. Start shelling...
1450: ;
1451: Set FailedInfFile = ""
1452:
1453: ForListDo $(InfsToBeRun)
1454: Set ThisInfName = $($)
1455: Set BbIndex = *($(BbToBeShown),$(#))
1456:
1457: Debug-Output "NTLANMAN.INF: Installing "$(ThisInfName)
1458:
1459: Ifint $(BbIndex) != 0
1460: read-syms Billboard$(BbIndex)$(!STF_LANGUAGE)
1461: Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
1462: Set BillboardVisible = 1
1463: Else-ifint $(BillboardVisible) != 0
1464: Shell "subroutn.inf" PopBillboard
1465: Set BillboardVisible = 0
1466: Endif
1467:
1468: Set FailedInfFile = $(ThisInfName)
1469:
1470: Set InfOption = *($(OptionsToInstall),$(#))
1471:
1472: Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(AdapterSrcDir) "YES" "NO" "NO"
1473:
1474: ; Reset the title string
1475: Set-title $(!NetProductTitle)" Network Installation"
1476:
1477: Ifint $($ShellCode) != $(!SHELL_CODE_OK)
1478: Debug-Output "NTLANMAN.INF: INF "$(ThisInfName)" SHELL ERROR!"
1479: Goto netruninfescape
1480: Endif
1481:
1482: Set NetInstallStatus = $($R0)
1483:
1484: Ifstr(i) $(NetInstallStatus) != STATUS_SUCCESSFUL
1485: Ifstr(i) $(NetInstallStatus) != STATUS_USERCANCEL
1486: Debug-Output "NTLANMAN.INF: INF "$(ThisInfName)" returned "$(NetInstallStatus)
1487: Goto netruninfescape
1488: Endif
1489: Endif
1490:
1491: Set FailedInfFile = ""
1492:
1493: EndForListDo
1494:
1495: ;
1496: ; All the products are set to be copied, and the Registry is up to date.
1497: ;
1498: netruninfescape = +
1499:
1500: Ifint $(BillboardVisible) != 0
1501: Shell "subroutn.inf" PopBillboard
1502: Set BillboardVisible = 0
1503: Endif
1504:
1505: Ifstr(i) $(FailedInfFile) != ""
1506: Read-syms FatalError14$(!STF_LANGUAGE)
1507: read-syms FatalDlg$(!STF_LANGUAGE)
1508: ui start "FatalError"
1509: Set NetInstallStatus = STATUS_FAILED
1510: Endif
1511:
1512: Goto netcheckquit
1513:
1514: ;****************************************************************
1515: ;
1516: ; ERROR MESSAGE AND EXIT ROUTINES
1517: ;
1518: ;****************************************************************
1519: ;
1520: ; information display
1521: ;
1522: infomsg = +
1523: read-syms InfoDlg
1524: ui start "Warning"
1525: goto $(from)
1526:
1527: ;
1528: ; non fatal error display
1529: ;
1530: nonfatal = +
1531: read-syms NonfatalDlg$(!STF_LANGUAGE)
1532: ui start "NonFatalError"
1533: ifstr(i) $(DLGEVENT) == "OK"
1534: goto $(from)
1535: else
1536: goto end
1537: endif
1538:
1539: ;
1540: ; Internal error in dialog handling.
1541: ;
1542: bogusexit = +
1543: Debug-Output "NTLANMAN.INF: BOGUS EXIT from "$(from)" Return addr: "$(retaddr)
1544: read-syms FatalError999$(!STF_LANGUAGE)
1545: goto fatal
1546:
1547: ;
1548: ; fatal error display
1549: ;
1550: fatal = +
1551: read-syms FatalDlg$(!STF_LANGUAGE)
1552: ui start "FatalError"
1553: goto term
1554:
1555: end = +
1556: goto term
1557:
1558: term =+
1559:
1560: Ifstr(i) $(!LIBHANDLE) != ""
1561: LibraryProcedure DontCare, $(!LIBHANDLE), DeleteAllConnections
1562: Endif
1563:
1564:
1565:
1566: setupnotdone = +
1567: Set InfoMsgText = "Returning to INITIAL.INF"
1568: Debug-Output "NTLANMAN.INF: "$(InfoMsgText)"; status "$(NetInstallStatus)
1569:
1570: returntocaller = +
1571: Return $(NetInstallStatus)
1572:
1573:
1574: exit
1575:
1576:
1577:
1578:
1579:
1580:
1581:
1582:
1583:
1584:
1585:
1586:
1587:
1588:
1589:
1590:
1591:
1592:
1593:
1594:
1595:
1596:
1597:
1598:
1599:
1600:
1601:
1602:
1603:
1604:
1605:
1606:
1607:
1608:
1609:
1610:
1611:
1612:
1613: ;**************************************************************************
1614: ;
1615: ; Code Lifted from HARDWARE.INF for the management of the "adapter type"
1616: ; interface.
1617: ;
1618: ;**************************************************************************
1619:
1620: [AdapterVars]
1621: AdapterHardwareDetected = ""
1622: AdapterSystemSet = ""
1623: AdapterDefault = ""
1624: AdapterOurINFOptions = {}
1625: AdapterOemINFOptions = {}
1626: AdapterMergedOptions = {}
1627: AdapterSpecialOption = {}
1628: AdapterCurrentOption = {}
1629:
1630: AdapterOptionList = {}
1631: AdapterOptionTextList = {}
1632: AdapterOption = {}
1633: AdapterINF = ""
1634: AdapterInstall = "NO"
1635: AdapterSrcDir = ""
1636: AdapterDstDir = ""
1637: NcParamInf = "NCPARAM.INF"
1638:
1639: [InitialAdapterInstall]
1640: ;
1641: ;
1642: StartWait
1643:
1644: ;
1645: ; Guarantee that netcard detection is activated
1646: ;
1647: Shell "" StartDetection
1648:
1649: set Status = STATUS_FAILED
1650: read-syms OemOptionDiskette$(!STF_LANGUAGE)
1651: read-syms Strings$(!STF_LANGUAGE)
1652: read-syms ProgressCopy$(!STF_LANGUAGE)
1653:
1654: Shell "subroutn.inf" ReadSetupHelpIds
1655: SetHelpFile "setupnt.hlp" $(!MinimumID) $(!MaximumID)
1656:
1657: read-syms AdapterVars
1658:
1659: ;
1660: ;;;;detect AdapterVars
1661: ;
1662:
1663: ;
1664: ; Set the Copy and Config flags based upon whether
1665: ; the NCPA called us or this is main installation
1666: ;
1667: Set !NtLmDoCopy = "YES"
1668: Set !NtLmAddCopy = "YES"
1669: Set !NtLmDoConfig = "NO"
1670:
1671: Ifstr(i) $(!NTN_Origination) == "ncpa"
1672: ; Secondary installation
1673: Ifstr(i) $(!STF_IDW) == "TRUE"
1674: Set !NtLmAddCopy = "NO"
1675: Set !NtLmDoCopy = "NO"
1676: Endif
1677: Else
1678: ; Primary installation
1679: Set !NtLmDoCopy = "NO"
1680: Ifstr(i) $(!STF_IDW) == "TRUE"
1681: Set !NtLmAddCopy = "NO"
1682: Endif
1683: Endif
1684:
1685: EndWait
1686: ;
1687: ; initialize all the adapter option vars
1688: ;
1689: read-syms Billboard1$(!STF_LANGUAGE)
1690: Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
1691:
1692: StartWait
1693: shell "" InitOptionVars $(!STF_LANGUAGE) NetAdapter +
1694: $(AdapterHardwareDetected) $(AdapterSystemSet) $(AdapterDefault)
1695: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
1696: set AdapterOurINFOptions = $($R1)
1697: set AdapterOemINFOptions = $($R2)
1698: set AdapterMergedOptions = $($R3)
1699: set AdapterSpecialOption = $($R4)
1700: set AdapterCurrentOption = $($R5)
1701: set AdapterOption = *($($R5), 1)
1702: else
1703: EndWait
1704: Shell "subroutn.inf" PopBillboard
1705: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error1)
1706: Set Status = STATUS_FAILED
1707: goto finish_adapter
1708: endif
1709:
1710: EndWait
1711: Shell "subroutn.inf" PopBillboard
1712: StartWait
1713: ;
1714: ; Initalize the listbox vars. Only allow the "None" option during
1715: ; primary installation.
1716: ;
1717: Ifstr(i) $(!NTN_Origination) != "NCPA"
1718: Set NoneOption = $(None)
1719: Else
1720: Set NoneOption = ""
1721: Endif
1722:
1723: Shell "" InitListBoxVars $(!STF_LANGUAGE) $(AdapterMergedOptions) $(AdapterSpecialOption) $(Other) $(NoneOption)
1724:
1725: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
1726: set AdapterOptionList = $($R1)
1727: set AdapterOptionTextList = $($R2)
1728: else
1729: EndWait
1730: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error2)
1731: goto finish_adapter
1732: endif
1733:
1734: read-syms DialogConstants
1735: EndWait
1736:
1737: ;------------------------------------------------------------
1738: ; Netcard Detection Logic
1739: ;------------------------------------------------------------
1740: ;
1741: ; Clear all the local and global variables associated with
1742: ; netcard detection.
1743: ;
1744: Set DtOption = ""
1745: Set DtIndex = 0
1746: Set DtInfIndex = 0
1747: Set DtAnyFound = NO
1748: Set !STF_NCOPTION = $(DtOption)
1749: Set !STF_NCDETCARD = $(DtIndex)
1750: Set !STF_NCDETINFO = {}
1751:
1752: ;
1753: ; Call the NCPA wrapper (through NCPARAM.INF) to enable detection.
1754: ;
1755: Debug-Output "NTLANMAN.INF: calling DTSTART wrapper, mode = "$(!STF_INSTALL_MODE)
1756:
1757: Shell $(NcParamInf) Param_ControlDetection DTSTART
1758: Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
1759: Debug-Output "NTLANMAN.INF: shell error (NCPARAM.INF:Param_ControlDetection) : "$($ShellCode)
1760: Goto adapter_shell_error
1761: Endif
1762:
1763: Ifstr(i) $($R0) != STATUS_SUCCESSFUL
1764: Debug-Output "NTLANMAN.INF: DTSTART wrapper FAILED"
1765: Goto detectbypass
1766: Endif
1767: ;
1768: ; If we aren't supposed to detect, skip out
1769: ;
1770: Ifstr(i) $(!STF_NCDETECT) == NO
1771: Goto detectbypass
1772: Endif
1773: ;
1774: ; If CUSTOM, allow the user to skip detection
1775: ;
1776: Ifstr(i) $(!STF_INSTALL_MODE) == CUSTOM
1777:
1778:
1779:
1780:
1781:
1782:
1783:
1784:
1785: Shell "" WarnDetectStart
1786: Ifstr(i) $($R0) != STATUS_SUCCESSFUL
1787: Goto detectbypass
1788: Endif
1789:
1790: Endif
1791:
1792: detectcycle = +
1793:
1794: Debug-Output "NTLANMAN.INF: calling DTCARD wrapper"
1795:
1796: StartWait
1797:
1798: Shell $(NcParamInf) Param_DetectCard
1799: Set StartResult = $($R0)
1800: Set StartStatus = *($(StartResult),1)
1801:
1802: Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
1803: Debug-Output "NTLANMAN.INF: shell error (NCPARAM.INF:Param_DetectCard) : "$($ShellCode)
1804: Goto adapter_shell_error
1805: Endif
1806:
1807: EndWait
1808:
1809: Ifint $(StartStatus) == 0
1810: Set DtOption = *($(StartResult),2)
1811: Set DtIndex = *($(StartResult),3)
1812: Set DtType = *($(StartResult),4)
1813: Set DtConf = *($(StartResult),5)
1814: Set DtBusType = *($(StartResult),6)
1815: Set DtBusNum = *($(StartResult),7)
1816: Set DtInfo = {$(DtOption),$(DtIndex),$(DtType),$(DtConf),$(DtBusType),$(DtBusNum)}
1817:
1818: Debug-Output "NTLANMAN.INF: card found is type "$(DtOption)", index "$(DtIndex)
1819: ;
1820: ; Guarantee that there's an INF file for this card type;
1821: ; if not, just try again.
1822: ;
1823: Set DtInfIndex = ~($(AdapterOptionList),$(DtOption))
1824: Ifint $(DtInfIndex) == 0
1825: Debug-Output "NTLANMAN.INF: Detect: no INF file for option: "$(DtOption)
1826: Set DtOption = ""
1827: Goto detectcycle
1828: Endif
1829: Else
1830: Set DtOption = ""
1831: Set DtIndex = 0
1832: Set DtInfIndex = 0
1833: Goto detectnotfound
1834: Endif
1835:
1836: Set DtAnyFound = YES
1837: Set DtInfOptionName = *($(AdapterOptionTextList),$(DtInfIndex))
1838: ;
1839: ; If EXPRESS, accept the card automatically
1840: ;
1841: Ifstr(i) $(!STF_INSTALL_MODE) == EXPRESS
1842: Goto detectend
1843: Endif
1844: ;
1845: ; See if the user wants this card or wants to quit
1846: ;
1847:
1848:
1849:
1850:
1851:
1852:
1853:
1854:
1855:
1856:
1857:
1858: Shell "" WarnDetectAccept $(DtInfOptionName)
1859:
1860: Ifstr(i) $($R0) == STATUS_SUCCESSFUL
1861: Goto detectend ; user likes this choice
1862: Endif
1863:
1864:
1865: Set DtInfOption = 0
1866: Set DtOption = ""
1867: Set DtInfIndex = 0
1868:
1869: Ifstr(i) $($R0) != STATUS_TRY_AGAIN
1870: Goto detectend ; user wants to quit
1871: Endif
1872: ;
1873: ; User doesn't want this card; try again.
1874: ;
1875: Goto detectcycle
1876:
1877: detectnotfound = +
1878:
1879: Shell "" WarnDetectFail $(DtAnyFound)
1880: Ifstr(i) $($R0) == STATUS_SUCCESSFUL
1881: Goto detectend
1882: Endif
1883: ;
1884: ; User wants to keep trying; reset the iteration
1885: ;
1886: Debug-Output "NTLANMAN.INF: calling DTRESET wrapper"
1887:
1888: Shell $(NcParamInf) Param_ControlDetection DTRESET
1889: Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
1890: Debug-Output "NTLANMAN.INF: shell error (NCPARAM.INF:Param_ControlDetection) : "$($ShellCode)
1891: Goto adapter_shell_error
1892: Endif
1893:
1894: Goto detectcycle
1895:
1896: detectend = +
1897: ;
1898: ; Establish global variables.
1899: ;
1900: Set !STF_NCOPTION = $(DtOption)
1901: Set !STF_NCDETCARD = $(DtIndex)
1902: Set !STF_NCDETINFO = $(DtInfo)
1903:
1904: detectbypass = +
1905: ;
1906: ; If we detected (and accepted) a netcard, use it.
1907: ;
1908: Ifstr(i) $(!STF_NCOPTION) != ""
1909: Set AdapterOption = $(!STF_NCOPTION)
1910: Goto install_adapter
1911: Endif
1912:
1913: ;
1914: ; If main installation, check to see if the user wants RAS
1915: ;
1916: Ifstr(i) $(!NTN_Origination) != "ncpa"
1917: Shell "" WarnCheckRas
1918: Ifstr(i) $($R0) == STATUS_WANTRAS
1919: Set Status = STATUS_WANTRAS
1920: Goto finish_adapter
1921: Endif
1922: Endif
1923:
1924: adapter = +
1925:
1926: read-syms QueryAdapter$(!STF_LANGUAGE)
1927: ;
1928: ; Set textual variations for dialog text based on mode and product type
1929: ;
1930: Ifstr(i) $(!NTN_Origination) == "ncpa"
1931: ; Secondary installation or NTLMINST.INF
1932: Set DlgText = $(DlgText2)
1933: Else-Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
1934: ; Primary installation, Advanced Server
1935: Set DlgText = $(DlgTextLm)
1936: Set Cancel = $(ExitSetup)
1937: Else
1938: ; Primary installation, Windows NT
1939: Set Cancel = $(ExitNoNet)
1940: Endif
1941:
1942: ui start "System"
1943:
1944: ifstr(i) $(DLGEVENT) == "CONTINUE"
1945: Debug-Output "NTLANMAN.INF: CONTINUE message from adapter dialog"
1946:
1947: ; Find out the option which changed.
1948: ;
1949: ifstr(i) $(Combo1Out) == $(None)
1950:
1951: ; Verify that this is REALLY what the user wants
1952:
1953: Shell "" QueryNoNic $(!STF_LANGUAGE)
1954: Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
1955: Debug-Output "NTLANMAN.INF: SHELL ERROR: "$($ShellCode)
1956: Endif
1957: Ifstr(i) $($R0) == "OK"
1958: set AdapterOption = NONE
1959: ui pop 1
1960: goto install_adapter
1961: Endif
1962:
1963: set ReInit = NO
1964: goto adapter
1965:
1966: else-ifstr(i) $(Combo1Out) != $(Other)
1967: set AdapterOption = *($(AdapterOptionList), ~($(Combo1List), $(Combo1Out)))
1968: ui pop 1
1969: goto install_adapter
1970: else
1971: Debug-Output "NTLANMAN.INF: Chose OTHER; calling GetNewOEMOption..."
1972: shell "OTHER.INF" GetNewOEMMultiOption $(!STF_LANGUAGE) +
1973: $(AdapterOemINFOptions) NetAdapter +
1974: $(AdapterDisketteSrc)
1975: set ReInit = YES
1976: ifstr(i) $($R0) == STATUS_SUCCESSFUL
1977: Debug-Output "NTLANMAN.INF: GetNewOEMOption successful"
1978: ;
1979: ; extract the new variables
1980: ;
1981: set AdapterOemINFOptions = $($R1)
1982: set AdapterOption = $($R2)
1983: set AdapterDisketteSrc = $($R4)
1984: ;
1985: ; Merge our options with the oem options
1986: ;
1987: shell "" MergeOptions $(AdapterOurINFOptions) $(AdapterOemINFOptions)
1988: ifstr(i) $($R0) == STATUS_SUCCESSFUL
1989: set AdapterMergedOptions = {$($R1), $($R2)}
1990: else
1991: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error4)
1992: ui pop 1
1993: goto finish_adapter
1994: endif
1995:
1996: ;
1997: ; Initialise the listbox vars
1998: ;
1999: shell "" InitListBoxVars $(!STF_LANGUAGE) $(AdapterMergedOptions) $(AdapterSpecialOption) $(Other) $(None)
2000: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2001: set AdapterOptionList = $($R1)
2002: set AdapterOptionTextList = $($R2)
2003: else
2004: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error2)
2005: ui pop 1
2006: goto finish_adapter
2007: endif
2008:
2009: ui pop 1
2010: goto install_adapter
2011:
2012: else-ifstr(i) $($R0) == "STATUS_USERCANCEL"
2013: Debug-Output "NTLANMAN.INF: GetNewOEMOption user cancelled"
2014: goto adapter
2015: else
2016: Debug-Output "NTLANMAN.INF: GetNewOEMOption other error"
2017: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Error3)
2018: goto adapter
2019: endif
2020:
2021: endif
2022:
2023: set ReInit = NO
2024: goto adapter
2025:
2026: else-ifstr(i) $(DLGEVENT) == "BACK"
2027: set ExitChoice = "OK"
2028:
2029: ifstr(i) $(!NTN_Origination) != "NCPA"
2030: Debug-Output "NTLANMAN.INF: EXIT button: see if user wants to quit"
2031: Shell "" QueryUserQuit $(!STF_LANGUAGE)
2032:
2033: Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
2034: Debug-Output "NTLANMAN.INF: SHELL ERROR: "$($ShellCode)
2035: Endif
2036:
2037: Set Status = $($R0)
2038: Debug-Output "NTLANMAN.INF: QueryUserQuit returned "$(Status)
2039: Else
2040: Set Status = STATUS_USERCANCEL
2041: endif
2042:
2043: ifstr(i) $(Status) != STATUS_SUCCESSFUL
2044: Debug-Output "NTLANMAN.INF: Quitting [InitialAdapterInstall]"
2045: ui pop 1
2046: goto finish_adapter
2047: else
2048: set ReInit = NO
2049: goto adapter
2050: endif
2051: else
2052: ui pop 1
2053: goto finish_adapter
2054: endif
2055:
2056: install_adapter = +
2057: Debug-Output "NTLANMAN.INF: Adapter option is "$(AdapterOption)
2058:
2059: ;
2060: ; See if the option is NONE; skip out if so
2061: ;
2062: Ifstr(i) $(AdapterOption) == NONE
2063: Set Status = STATUS_SUCCESSFUL
2064: goto skip_setinstall
2065: Endif
2066:
2067: ;
2068: ; See if option has changed
2069: ;
2070: set Changed = YES
2071: ifstr(i) $(AdapterOption) == *($(AdapterCurrentOption), 1)
2072: set Changed = NO
2073: endif
2074:
2075: set AdapterInstall = YES
2076:
2077: ;
2078: ; check special option first... skip
2079: ;
2080:
2081: ifstr(i) $(AdapterSpecialOption) != {}
2082: ifstr(i) $(AdapterOption) == *($(AdapterSpecialOption), 1)
2083: goto skip_setinstall
2084: endif
2085: endif
2086:
2087: ; choose file name and path based upon origin
2088:
2089: set AdapterSrcDir = $(AdapterDisketteSrc)
2090:
2091: shell "" GetOptionFile $(AdapterOption) $(AdapterOemINFOptions)
2092: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2093: set AdapterINF = $(!STF_WINDOWSSYSPATH)"\"$($R1)
2094: set AdapterSrcDir = $(AdapterDisketteSrc)
2095: ;
2096: ; For both IDW and OEM, force "do copy" and "add copy" back to YES
2097: ;
2098: Set !STF_SRCDIR_OVERRIDE = $(AdapterSrcDir)
2099: Set !NtLmDoCopy = "YES"
2100: Set !NtLmAddCopy = "YES"
2101: goto skip_setinstall
2102: endif
2103:
2104: ;
2105: ; check if our option
2106: ;
2107:
2108: shell "" GetOptionFile $(AdapterOption) $(AdapterOurINFOptions)
2109: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2110: set AdapterINF = $($R1)
2111: set AdapterSrcDir = $(!STF_SRCDIR)
2112: endif
2113:
2114: skip_setinstall = +
2115:
2116: ifstr(i) $(AdapterInstall) == YES
2117: ifstr(i) $(AdapterINF) != ""
2118: read-syms Billboard8$(!STF_LANGUAGE)
2119:
2120: Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
2121:
2122: shell $(AdapterINF) InstallOption $(!STF_LANGUAGE) $(AdapterOption) $(AdapterSrcDir) +
2123: $(!NtLmAddCopy) $(!NtLmDoCopy) $(!NtLmDoConfig)
2124: Set Status = $($R0)
2125:
2126: Set !STF_SRCDIR_OVERRIDE = ""
2127:
2128: Shell "subroutn.inf" PopBillboard
2129: Ifstr(i) $(Status) == STATUS_USERCANCEL
2130: Goto adapter
2131: Endif
2132: endif
2133: endif
2134:
2135: goto finish_adapter
2136:
2137: adapter_shell_error = +
2138: set Status = STATUS_FAILED
2139: ;
2140: ; At this point, $(Status) is one of:
2141: ;
2142: ; STATUS_SUCCESSFUL
2143: ; STATUS_USERCANCEL
2144: ; STATUS_EXITNET (only if main installation)
2145: ; STATUS_WANTRAS (if RAS was chosen as netcard option)
2146: ;
2147: finish_adapter = +
2148: Ifstr(i) $(AdapterSrcDir) != ""
2149: Ifstr(i) $(AdapterSrcDir) != $(!STF_SRCDIR)
2150: Set !STF_SRCDIR_OVERRIDE = $(AdapterSrcDir)
2151: Endif
2152: Endif
2153:
2154: Return $(Status)
2155:
2156: ;-----------------------------------------------------------------------
2157: ;-----------------------------------------------------------------------
2158: ;-----------------------------------------------------------------------
2159: ;-----------------------------------------------------------------------
2160: ;-----------------------------------------------------------------------
2161: ;-----------------------------------------------------------------------
2162: ;-----------------------------------------------------------------------
2163: ;-----------------------------------------------------------------------
2164: ; GenMergeLists
2165: ;
2166: ; Merge any two lists:
2167: ;
2168: ; INPUTS: $0 list A
2169: ; $1 list B
2170: ;
2171: ; OUTPUTS: $R0 list (A+B)
2172: ;
2173: [GenMergeLists]
2174: ForListDo $($1)
2175: Set $0 = >($($0),$($))
2176: EndForListDo
2177:
2178: Return $($0)
2179:
2180:
2181: [OemSoftVars]
2182: OemSoftHardwareDetected = ""
2183: OemSoftSystemSet = ""
2184: OemSoftDefault = ""
2185: OemSoftOurINFOptions = {}
2186: OemSoftOemINFOptions = {}
2187: OemSoftMergedOptions = {}
2188: OemSoftSpecialOption = {}
2189: OemSoftCurrentOption = {}
2190:
2191: OemSoftOptionList = {}
2192: OemSoftOptionTextList = {}
2193: OemSoftOption = {}
2194: OemSoftINF = ""
2195: OemSoftInstall = "NO"
2196: OemSoftSrcDir = ""
2197: OemSoftDstDir = ""
2198:
2199: [OemSoftTypes]
2200: NDR = NetDriver, ndr
2201: NXP = NetTransport, nxp
2202: NSV = NetService, nsv
2203: NWK = Network, nwk
2204: NPR = NetProvider, npr
2205:
2206: [OemSoftwareInstall]
2207: Debug-Output "NTLANMAN.INF: Begin OEM software installation"
2208: ;
2209: ;
2210: StartWait
2211:
2212: set Status = STATUS_FAILED
2213: read-syms OemOptionDiskette$(!STF_LANGUAGE)
2214: read-syms Strings$(!STF_LANGUAGE)
2215: read-syms ProgressCopy$(!STF_LANGUAGE)
2216:
2217: Shell "subroutn.inf" ReadSetupHelpIds
2218: SetHelpFile "setupnt.hlp" $(!MinimumID) $(!MaximumID)
2219:
2220: read-syms OemSoftVars
2221:
2222: ;
2223: ; Set the Copy and Config flags based upon whether
2224: ; the NCPA called us or this is main installation
2225: ;
2226: Set !NtLmDoCopy = "YES"
2227: Set !NtLmAddCopy = "YES"
2228: Set !NtLmDoConfig = "NO"
2229:
2230: Ifstr(i) $(!NTN_Origination) == "ncpa"
2231: ; Secondary installation
2232: Ifstr(i) $(!STF_IDW) == "TRUE"
2233: Set !NtLmAddCopy = "NO"
2234: Set !NtLmDoCopy = "NO"
2235: Endif
2236: Else
2237: ; Primary installation
2238: Set !NtLmDoCopy = "NO"
2239: Ifstr(i) $(!STF_IDW) == "TRUE"
2240: Set !NtLmAddCopy = "NO"
2241: Endif
2242: Endif
2243:
2244:
2245: Set OemSoftTypeNames = ^(OemSoftTypes,1)
2246: Set OemSoftTypeIds = ^(OemSoftTypes,2)
2247: EndWait
2248:
2249: ;
2250: ; initialize all the OEM software option vars
2251: ;
2252: read-syms Billboard9$(!STF_LANGUAGE)
2253: Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
2254: StartWait
2255:
2256: shell "" InitOptionVars $(!STF_LANGUAGE) $(OemSoftTypeNames) $(OemSoftHardwareDetected) $(OemSoftSystemSet) $(OemSoftDefault)
2257: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2258: set OemSoftOurINFOptions = $($R1)
2259: set OemSoftOemINFOptions = $($R2)
2260: set OemSoftMergedOptions = $($R3)
2261: set OemSoftSpecialOption = $($R4)
2262: set OemSoftCurrentOption = $($R5)
2263: set OemSoftOption = *($($R5), 1)
2264: else
2265: EndWait
2266: Shell "subroutn.inf" PopBillboard
2267: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error1)
2268: goto finish_oemsoft
2269: endif
2270:
2271: EndWait
2272: Shell "subroutn.inf" PopBillboard
2273: StartWait
2274: ;
2275: ; Initalize the listbox vars
2276: ;
2277: shell "" InitListBoxVars $(!STF_LANGUAGE) $(OemSoftMergedOptions) $(OemSoftSpecialOption) $(Other) ""
2278:
2279: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2280: set OemSoftOptionList = $($R1)
2281: set OemSoftOptionTextList = $($R2)
2282: else
2283: EndWait
2284: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error2)
2285: goto finish_oemsoft
2286: endif
2287:
2288: read-syms DialogConstants
2289: EndWait
2290:
2291: oemsoft = +
2292:
2293: read-syms QueryOemSoft$(!STF_LANGUAGE)
2294:
2295: ui start "System"
2296:
2297: ifstr(i) $(DLGEVENT) == "CONTINUE"
2298: Debug-Output "NTLANMAN.INF: CONTINUE message from OEM software dialog"
2299: ;
2300: ; Find out the option which changed.
2301: ;
2302: ifstr(i) $(Combo1Out) != $(Other)
2303: set OemSoftOption = *($(OemSoftOptionList), ~($(Combo1List), $(Combo1Out)))
2304: Debug-Output "NTLANMAN.INF: Changed to choice "$(OemSoftOption)
2305: ui pop 1
2306: goto install_oemsoft
2307: else
2308: Debug-Output "NTLANMAN.INF: Chose OTHER; calling GetNewOEMMultiOption..."
2309: shell "OTHER.INF" GetNewOEMMultiOption $(!STF_LANGUAGE) $(OemSoftOemINFOptions) $(OemSoftTypeNames) $(OemSoftDisketteSrc)
2310: Set ReInit = YES
2311: ifstr(i) $($R0) == STATUS_SUCCESSFUL
2312: Debug-Output "NTLANMAN.INF: GetNewOEMOption successful"
2313: ;
2314: ; extract the new variables
2315: ;
2316: set OemSoftOemINFOptions = $($R1)
2317: set OemSoftOption = $($R2)
2318: set OemSoftDisketteSrc = $($R4)
2319: ;
2320: ; Merge our options with the oem options
2321: ;
2322: shell "" MergeOptions $(OemSoftOurINFOptions) $(OemSoftOemINFOptions)
2323: ifstr(i) $($R0) == STATUS_SUCCESSFUL
2324: set OemSoftMergedOptions = {$($R1), $($R2)}
2325: else
2326: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error4)
2327: ui pop 1
2328: goto finish_oemsoft
2329: endif
2330:
2331: ;
2332: ; Initialise the listbox vars
2333: ;
2334: shell "" InitListBoxVars $(!STF_LANGUAGE) $(OemSoftMergedOptions) $(OemSoftSpecialOption) $(Other) ""
2335: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2336: set OemSoftOptionList = $($R1)
2337: set OemSoftOptionTextList = $($R2)
2338: else
2339: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Error2)
2340: ui pop 1
2341: goto finish_oemsoft
2342: endif
2343:
2344: ui pop 1
2345: goto install_oemsoft
2346:
2347: else-ifstr(i) $($R0) == "STATUS_USERCANCEL"
2348: Debug-Output "NTLANMAN.INF: GetNewOEMOption user cancelled"
2349: goto oemsoft
2350: else
2351: Debug-Output "NTLANMAN.INF: GetNewOEMOption other error"
2352: shell "SUBROUTN.INF" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Error3)
2353: goto oemsoft
2354: endif
2355:
2356: endif
2357:
2358: set ReInit = NO
2359: goto oemsoft
2360:
2361: else-ifstr(i) $(DLGEVENT) == "BACK"
2362: set Status = STATUS_USERCANCEL
2363: ui pop 1
2364: goto finish_oemsoft
2365: else
2366: ui pop 1
2367: goto finish_oemsoft
2368: endif
2369:
2370: install_oemsoft = +
2371: ;
2372: ; See if option has changed
2373: ;
2374: set Changed = YES
2375: ifstr(i) $(OemSoftOption) == *($(OemSoftCurrentOption), 1)
2376: set Changed = NO
2377: endif
2378:
2379: ;
2380: ; If option has not changed and we are SETUPBOOTED mode then skip
2381: ;
2382: ifstr(i) $(Changed) == "NO"
2383: ifstr(i) $(!STF_INSTALL_TYPE) == "SETUPBOOTED"
2384: set OemSoftInstall = "NO"
2385: goto skip_setinstall
2386: endif
2387: endif
2388: set OemSoftInstall = "YES"
2389:
2390: ;
2391: ; check special option first
2392: ;
2393:
2394: ifstr(i) $(OemSoftSpecialOption) != {}
2395: ifstr(i) $(OemSoftOption) == *($(OemSoftSpecialOption), 1)
2396: goto skip_setinstall
2397: endif
2398: endif
2399:
2400: ; choose file name and path based upon origin
2401:
2402: set OemSoftSrcDir = $(OemSoftDisketteSrc)
2403:
2404: shell "" GetOptionFile $(OemSoftOption) $(OemSoftOemINFOptions)
2405: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2406: set OemSoftINF = $(!STF_WINDOWSSYSPATH)"\"$($R1)
2407: set OemSoftSrcDir = $(OemSoftDisketteSrc)
2408: ;
2409: ; For both IDW and OEM, force "do copy" and "add copy" back to YES
2410: ;
2411: Set !STF_SRCDIR_OVERRIDE = $(OemSoftSrcDir)
2412: Set !NtLmDoCopy = "YES"
2413: Set !NtLmAddCopy = "YES"
2414: goto skip_setinstall
2415: endif
2416:
2417: ; check if our option
2418:
2419: shell "" GetOptionFile $(OemSoftOption) $(OemSoftOurINFOptions)
2420: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2421: set OemSoftINF = $($R1)
2422: set OemSoftSrcDir = $(!STF_SRCDIR)
2423: goto skip_setinstall
2424: endif
2425:
2426: skip_setinstall = +
2427:
2428: ifstr(i) $(OemSoftInstall) == "YES"
2429: ifstr(i) $(OemSoftINF) != ""
2430:
2431: shell $(OemSoftINF) InstallOption $(!STF_LANGUAGE) $(OemSoftOption) $(OemSoftSrcDir) +
2432: $(!NtLmAddCopy) $(!NtLmDoCopy) $(!NtLmDoConfig)
2433:
2434: Set !STF_SRCDIR_OVERRIDE = ""
2435: Set Status = $($R0)
2436:
2437: Ifstr(i) $(Status) == STATUS_USERCANCEL
2438: Goto oemsoft
2439: Endif
2440: endif
2441: endif
2442:
2443: finish_oemsoft = +
2444:
2445: Ifstr(i) $(OemSoftSrcDir) != ""
2446: Ifstr(i) $(OemSoftSrcDir) != $(!STF_SRCDIR)
2447: Set !STF_SRCDIR_OVERRIDE = $(OemSoftSrcDir)
2448: Endif
2449: Endif
2450:
2451: Return $(Status)
2452:
2453:
2454:
2455: ;-----------------------------------------------------------------------
2456: ;
2457: ; ROUTINE: InitOptionVars
2458: ;
2459: ; DESCRIPTION: This routine intialises the values for the option we are
2460: ; dealing with. It finds out the options supported by setup.
2461: ; It also sees if there is an OEM INF in the windows system
2462: ; directory which represents this option. If so it reads in
2463: ; the options supported by this INF and then forms a merged
2464: ; list from the two.
2465: ;
2466: ; INPUTS: $0: Language to use
2467: ; $1: OptionTypeList; e.g., { NetDriver, NetTransport }
2468: ; $2: Hardware detected option
2469: ; $3: Software set option
2470: ; $4: Default value for option
2471: ;
2472: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL |
2473: ; STATUS_FAILED
2474: ;
2475: ; $R1: OurINFOptions var {{filename, {OptionList}, {OptionTextList}}}
2476: ; $R2: OemINFOptions var {{filename, {OptionList}, {OptionTextList}}, etc}
2477: ; $R3: Merged INF Options {{OptionList}, {OptionTextList}}
2478: ; $R4: Special Options {Option, OptionText}
2479: ; $R5: Current Option {Option, OptionText}
2480: ;
2481: ;------------------------------------------------------------------------
2482: [InitOptionVars]
2483:
2484: Debug-Output "NTLANMAN.INF: InitOptionVars called"
2485:
2486: set Status = STATUS_FAILED
2487: set OurINFOptions = {}
2488: set OemINFOptions = {}
2489: set MergedINFOptions = {}
2490: set SpecialOption = {}
2491: set CurrentOption = {}
2492: Set IovTypeList = $($1)
2493:
2494: ;
2495: ; Determine all Oem options for all types given. These
2496: ; are considered to be "our" options, as opposed to newly
2497: ; added INF files, which are "oem".
2498: ;
2499: ForListDo $(IovTypeList)
2500: Debug-Output "NTLANMAN.INF: Get options for type "$($)
2501: shell "OTHER.INF" ReturnOemOptions $($0) $($)
2502: ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
2503: Debug-Output "NTLANMAN.INF: Other OEM options found for type "$($)
2504: shell "" GenMergeLists $(OurINFOptions) $($R1)
2505: set OurINFOptions = $($R0)
2506: endif
2507: EndForListDo
2508: ;
2509: ; Merge the two and set the merged list
2510: ;
2511: shell "" MergeOptions $(OurINFOptions) $(OemINFOptions)
2512: ifstr(i) $($R0) == STATUS_SUCCESSFUL
2513: set MergedINFOptionList = $($R1)
2514: set MergedINFOptionTextList = $($R2)
2515: set MergedINFOptions = {$($R1), $($R2)}
2516: else
2517: Debug-Output "NTLANMAN.INF: InitOptionVars: MergeOptions failed"
2518: goto finish_InitOptionVars
2519: endif
2520:
2521: ;
2522: ; Form current option.
2523: ;
2524: ; Algorithm:
2525: ;
2526: ; Check software set value. If this doesn't exist get hardware detected
2527: ; value. If not detected set value to default.
2528: ;
2529: set Option = ""
2530: ifstr(i) $($3) != ""
2531: set Option = $($3)
2532: else
2533: ifstr(i) $($2) != ""
2534: set Option = $($2)
2535: else-ifstr(i) $($4) == ""
2536: set Option = ""
2537: else
2538: set Option = $($4)
2539: endif
2540: endif
2541:
2542: ;
2543: ; Check Option against all the options supported
2544: ; If found set Current Option, else set the special options var
2545: ; and set this to the current option.
2546: ;
2547:
2548: ifstr(i) $(Option) == ""
2549: set OptionText = ""
2550: else-ifcontains(i) $(Option) in $(MergedINFOptionList)
2551: set OptionText = *($(MergedINFOptionTextList), ~($(MergedINFOptionList), $(Option)))
2552: else
2553: set OptionText = $(Option)
2554: set Option = "OEMINSTALLEDOPTION"
2555: set SpecialOption = {$(Option), $(OptionText)}
2556: endif
2557:
2558: set CurrentOption = {$(Option), $(OptionText)}
2559: set Status = STATUS_SUCCESSFUL
2560:
2561: finish_InitOptionVars = +
2562: Debug-Output "NTLANMAN.INF::InitOptionVars complete "
2563:
2564: Return $(Status) $(OurINFOptions) $(OemINFOptions) $(MergedINFOptions) $(SpecialOption) $(CurrentOption)
2565:
2566:
2567: ;-------------------------------------------------------------------------
2568: ;
2569: ; ROUTINE: InitListBoxVars
2570: ;
2571: ; DESCRIPTION: This routine initialises the option list and the option text
2572: ; list to be displayed to the user.
2573: ;
2574: ; INPUTS: $0: Language
2575: ; $1: MergedINFOptions
2576: ; $2: SpecialOption
2577: ; $3: OtherOption
2578: ; $4: NoneOption
2579: ;
2580: ; OUTPUTS: $R0: STATUS: STATUS_FAILED |
2581: ; STATUS_SUCCESSFUL
2582: ;
2583: ; $R1: OptionList
2584: ; $R2: OptionTextList
2585: ;
2586: ;----------------------------------------------------------------------------
2587: [InitListBoxVars]
2588:
2589: Debug-Output "NTLANMAN.INF::InitListBoxVars invoked"
2590:
2591: set Status = STATUS_FAILED
2592: set OptionList = {}
2593: set OptionTextList = {}
2594: Set OptOther = $($3)
2595: Set OptNone = $($4)
2596: Set UtilityInf = "UTILITY.INF"
2597:
2598: ;
2599: ; Process the standard options
2600: ;
2601:
2602: ifstr(i) $($1) != {}
2603: set OptionList = *($($1), 1)
2604: set OptionTextList = *($($1), 2)
2605: endif
2606:
2607: ;
2608: ; Process the special option if present
2609: ;
2610:
2611: ifstr(i) $($2) != {}
2612: set OptionList = >($(OptionList), *($($2), 1))
2613: set OptionTextList = >($(OptionTextList), *($($2), 2))
2614: endif
2615: ;
2616: ; Sort the lists ascending, case-insensitive
2617: ;
2618: Shell $(UtilityInf) SortListIndex $(OptionTextList) TRUE FALSE
2619: Set IndexList = $($R0)
2620: Shell $(UtilityInf) SortByIndex $(OptionTextList) $(IndexList)
2621: Set OptionTextList = $($R0)
2622: Shell $(UtilityInf) SortByIndex $(OptionList) $(IndexList)
2623: Set OptionList = $($R0)
2624:
2625: ;
2626: ; Add the "other" and "none" options only to the text list
2627: ; (if present)
2628: ;
2629: Ifstr(i) $(OptOther) != ""
2630: set OptionTextList = >($(OptionTextList), $(OptOther))
2631: Endif
2632: Ifstr(i) $(OptNone) != ""
2633: set OptionTextList = >($(OptionTextList), $(OptNone))
2634: Endif
2635:
2636: set Status = STATUS_SUCCESSFUL
2637:
2638: Return $(Status) $(OptionList) $(OptionTextList)
2639:
2640:
2641: ;-----------------------------------------------------------------------
2642: ;
2643: ; ROUTINE: MergeOptions
2644: ;
2645: ; DESCRIPTION: This merges the option lists to form the master list of
2646: ; options and optiontext.
2647: ;
2648: ; INPUTS: $0: OurOptionList
2649: ; $1: OemOptionList
2650: ;
2651: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL |
2652: ; STATUS_FAILED
2653: ;
2654: ; $R1: MergedOptionList
2655: ; $R2: MergedOptionTextList
2656: ;
2657: ;
2658: ;------------------------------------------------------------------------
2659: [MergeOptions]
2660:
2661: Debug-Output "NTLANMAN.INF: MergeOptions called"
2662:
2663: set Status = STATUS_FAILED
2664: set MergedOptionList = {}
2665: set MergedOptionTextList = {}
2666:
2667: ;
2668: ; First merge our options in
2669: ;
2670:
2671: ForListDo $($0)
2672: set OptionList = *($($), 2)
2673: set OptionTextList = *($($), 3)
2674: ForListDo $(OptionList)
2675: Ifcontains $($) in $(MergedOptionList)
2676: else
2677: set MergedOptionList = >($(MergedOptionList), $($))
2678: set MergedOptionTextList = >($(MergedOptionTextList), *($(OptionTextList), $(#)))
2679: endif
2680: EndForListDo
2681: EndForListDo
2682:
2683:
2684: ;
2685: ; Then merge the oem options in
2686: ;
2687:
2688: ForListDo $($1)
2689: set OptionList = *($($), 2)
2690: set OptionTextList = *($($), 3)
2691: ForListDo $(OptionList)
2692: Ifcontains $($) in $(MergedOptionList)
2693: else
2694: set MergedOptionList = >($(MergedOptionList), $($))
2695: set MergedOptionTextList = >($(MergedOptionTextList), *($(OptionTextList), $(#)))
2696: endif
2697: EndForListDo
2698: EndForListDo
2699:
2700: set Status = STATUS_SUCCESSFUL
2701: Return $(Status) $(MergedOptionList) $(MergedOptionTextList)
2702:
2703:
2704: ;-----------------------------------------------------------------------
2705: ;
2706: ; ROUTINE: GetOptionFile
2707: ;
2708: ; DESCRIPTION: Given the Option list and the current option, determines
2709: ; if the current option is a supported option and returns the
2710: ; file representing the option
2711: ;
2712: ; INPUTS: $0: OptionChosen
2713: ; $1: OptionList {{filename, {optionlist}, {optiontextlist}}
2714: ;
2715: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL |
2716: ; STATUS_FILENOTFOUND |
2717: ; STATUS_FAILED
2718: ;
2719: ; $R1: FileName
2720: ;
2721: ;------------------------------------------------------------------------
2722: [GetOptionFile]
2723:
2724: Debug-Output "NTLANMAN.INF: GetOptionFile called"
2725:
2726: set Status = STATUS_FILENOTFOUND
2727: set FileName = ""
2728: ;
2729: ForListDo $($1)
2730: set OptionFile = *($($), 1)
2731: set OptionList = *($($), 2)
2732: ForListDo $(OptionList)
2733: ifstr(i) $($) == $($0)
2734: set Status = STATUS_SUCCESSFUL
2735: set FileName = $(OptionFile)
2736: endif
2737: EndForListDo
2738: EndForListDo
2739:
2740: finish_GetOptionFile = +
2741: Debug-Output "NTLANMAN.INF: GetOptionFile status "$(Status)"; file: "$(FileName)
2742: Return $(Status) $(FileName)
2743:
2744: ;-----------------------------------------------------------------------
2745: ; ROUTINE: QueryUserQuit
2746: ;
2747: ; DESCRIPTION: This routine queries whether the user wants to quit
2748: ; networking setup. Three choices are allowed:
2749: ;
2750: ; OK means cancel the installation operation
2751: ; CANCEL means cancel
2752: ;
2753: ;
2754: ; INPUTS: $0: Language To Use
2755: ;
2756: ; OUTPUTS: $R0: STATUS_EXITNET if OK in WinNT
2757: ; STATUS_USERCANCEL if OK in LanmanNT (AS)
2758: ; STATUS_SUCCESSFUL if CANCEL (continue installation)
2759: ;
2760: ;------------------------------------------------------------------------
2761: [QueryUserQuit]
2762: Set Status = STATUS_SUCCESSFUL
2763: Set StatusOK = STATUS_USERCANCEL
2764:
2765:
2766:
2767:
2768: Ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
2769: read-syms LmExitWarningDlg$($0)
2770: Else
2771: Set StatusOK = STATUS_EXITNET
2772: read-syms ExitWarningDlg$($0)
2773: Endif
2774:
2775:
2776: ui start "MessageBox"
2777: Ifstr(i) $(DLGEVENT) == "OK"
2778: Set Status = $(StatusOK)
2779: Endif
2780:
2781: fin_QueryUserQuit = +
2782: Return $(Status)
2783:
2784: ;-----------------------------------------------------------------------
2785: ; ROUTINE: QueryNoNic
2786: ;
2787: ; DESCRIPTION: This routine queries whether the user really wants
2788: ; the "None" network card choice.
2789: ;
2790: ; INPUTS: $0: Language To Use
2791: ;
2792: ; OUTPUTS: $R0: OK or CANCEL
2793: ;
2794: ;------------------------------------------------------------------------
2795: [QueryNoNic]
2796: read-syms NoNicWarningDlg$($0)
2797: ui start "MessageBox"
2798: return $(DLGEVENT)
2799:
2800:
2801: ;-----------------------------------------------------------------------
2802: ; ROUTINE: InstallLmNetFiles
2803: ;
2804: ; DESCRIPTION: Function called by NTLMINST.INF to install network files.
2805: ;
2806: ; INPUTS: none
2807: ;
2808: ; OUTPUTS: $R0: STATUS_SUCCESSFUL
2809: ; or STATUS_USERCANCEL
2810: ; or STATUS_FAILED
2811: ;
2812: ;------------------------------------------------------------------------
2813: [InstallLmNetFiles]
2814: read-syms GeneralConstants
2815: read-syms DestNetPathNames
2816: Set Status = STATUS_FAILED
2817:
2818: Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR) NO
2819:
2820: Ifint $($ShellCode) != $(!SHELL_CODE_OK)
2821: Goto ILMNF_Return
2822: Else-Ifstr(i) $($R0) == STATUS_FAILED
2823: Goto ILMNF_Return
2824: Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
2825: Set Status = $($R0)
2826: Goto ILMNF_Return
2827: Endif
2828:
2829: Set !STF_SRCDIR = $($R1)
2830:
2831: Set Status = STATUS_SUCCESSFUL
2832:
2833: ILMNF_Return = +
2834: Return $(Status)
2835:
2836:
2837:
2838: ;-----------------------------------------------------------------------
2839: ;
2840: ; ROUTINE: InstallOemHook
2841: ;
2842: ; DESCRIPTION: Install the INF file OEMHOOK.INF, which contains
2843: ; whatever network alterations and enhancements the
2844: ; OEM requires.
2845: ;
2846: ; Since this file is not required, no error checking
2847: ; is done.
2848: ;
2849: ; INPUTS: None
2850: ;
2851: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL always
2852: ;
2853: ;------------------------------------------------------------------------
2854: [InstallOemHook]
2855: Set InfName = "OEMHOOK.INF"
2856:
2857: Debug-Output "NTLANMAN.INF: Installing OEMHOOK.INF if present"
2858:
2859: Shell $(InfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(!STF_SRCDIR) "YES" "NO" "NO"
2860:
2861: IHK_Exit = +
2862: Return STATUS_SUCCESSFUL
2863:
2864:
2865:
2866:
2867:
2868:
2869:
2870:
2871:
2872:
2873:
2874:
2875:
2876:
2877:
2878:
2879:
2880:
2881:
2882:
2883:
2884:
2885:
2886:
2887:
2888:
2889:
2890:
2891:
2892:
2893:
2894:
2895:
2896:
2897:
2898:
2899:
2900:
2901:
2902:
2903:
2904:
2905:
2906:
2907:
2908:
2909:
2910:
2911:
2912: ;-----------------------------------------------------------------------
2913: ;
2914: ; ROUTINE: StartDetection
2915: ;
2916: ; DESCRIPTION: Start the newly installed netcard detection service
2917: ;
2918: ;
2919: ; INPUTS: None
2920: ;
2921: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL always
2922: ;
2923: ;------------------------------------------------------------------------
2924: [StartDetection]
2925: Set UtilityInf = "UTILITY.INF"
2926: Set ServiceName = "NETDETECT"
2927: Set ReturnStatus = STATUS_SUCCESSFUL
2928:
2929: Debug-Output "NTLANMAN.INF: Starting the netcard detection service"
2930:
2931: Set FLibraryErrCtl = 1
2932: LibraryProcedure StartResult $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, $(ServiceName)
2933: Set FLibraryErrCtl = 0
2934:
2935: Set StartStatus = *($(StartResult),1)
2936: Debug-Output "NTLANMAN.INF: NETDETECT status was: "$(StartStatus)
2937:
2938: ; Check that it started or is already running
2939:
2940: Ifint $(StartStatus) != 0
2941: Ifint $(StartStatus) != 1056
2942: Set ReturnStatus = STATUS_FAILED
2943: Endif
2944: Endif
2945:
2946: ; Update the netcard detection DLL name list
2947:
2948: Shell $(UtilityInf) UpdateDetectionDllNames
2949:
2950: IHK_Exit = +
2951: Return $(ReturnStatus)
2952:
2953:
2954: ;-----------------------------------------------------------------------
2955: ;
2956: ; ROUTINE: WarnDetectStart
2957: ;
2958: ; DESCRIPTION: Warn the user that netcard detection is about to start
2959: ;
2960: ; INPUTS: None
2961: ;
2962: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL if detection desired
2963: ; STATUS_FAILED if undesirable
2964: ;
2965: ;------------------------------------------------------------------------
2966: [WarnDetectStart]
2967: Set Result = STATUS_SUCCESSFUL
2968: Read-syms WarnDetectDlg$(!STF_LANGUAGE)
2969:
2970: ui start "Info"
2971:
2972: Ifstr(i) $(DLGEVENT) != CONTINUE
2973: Set Result = STATUS_FAILED
2974: Endif
2975:
2976: ui pop 1
2977: Return $(Result)
2978:
2979: ;-----------------------------------------------------------------------
2980: ;
2981: ; ROUTINE: WarnDetectAccept
2982: ;
2983: ; DESCRIPTION: Warn the user that netcard detection is about to start
2984: ;
2985: ; INPUTS: $0: Name of netcard found
2986: ;
2987: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL if card is OK
2988: ; STATUS_FAILED if detection is to cease
2989: ; STATUS_TRY_AGAIN if another card is to be found
2990: ;
2991: ;------------------------------------------------------------------------
2992: [WarnDetectAccept]
2993: Set Result = STATUS_SUCCESSFUL
2994: Set DlgData = $($0)
2995: Read-syms WarnDetectAccept$(!STF_LANGUAGE)
2996: ui start "Info"
2997:
2998: Ifstr(i) $(DLGEVENT) == EXIT
2999: Set Result = STATUS_FAILED
3000: Else-Ifstr(i) $(DLGEVENT) == BACK
3001: Set Result = STATUS_TRY_AGAIN
3002: Else
3003: Set Result = STATUS_SUCCESSFUL
3004: Endif
3005:
3006: ui pop 1
3007: Return $(Result)
3008:
3009: ;-----------------------------------------------------------------------
3010: ;
3011: ; ROUTINE: WarnDetectFail
3012: ;
3013: ; DESCRIPTION: Warn the user that netcard detection has failed.
3014: ; Allow reiteration
3015: ;
3016: ; INPUTS: $0: YES if a netcard was detected previously
3017: ;
3018: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL if user wants to stop
3019: ; STATUS_FAILED if user wants to retry
3020: ;
3021: ;------------------------------------------------------------------------
3022: [WarnDetectFail]
3023: Set FoundCard = $($0)
3024: Set Result = STATUS_SUCCESSFUL
3025: Read-syms WarnDetectFail$(!STF_LANGUAGE)
3026: Ifstr(i) $(FoundCard) != YES
3027: Read-syms WarnDetectFail2$(!STF_LANGUAGE)
3028: Endif
3029:
3030: ui start "Info"
3031:
3032: Ifstr(i) $(DLGEVENT) != CONTINUE
3033: Set Result = STATUS_FAILED
3034: Endif
3035:
3036: ui pop 1
3037: Return $(Result)
3038:
3039: ;-----------------------------------------------------------------------
3040: ;
3041: ; ROUTINE: WarnCheckRas
3042: ;
3043: ; DESCRIPTION: See if the user wants RAS installed.
3044: ;
3045: ; INPUTS: None
3046: ;
3047: ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL if continue to pick net card
3048: ; STATUS_WANTRAS if RAS is to be installed
3049: ;
3050: ;------------------------------------------------------------------------
3051: [WarnCheckRas]
3052: Set Result = STATUS_SUCCESSFUL
3053: Read-syms WarnInstallRas$(!STF_LANGUAGE)
3054:
3055: ui start "Info"
3056:
3057: Ifstr(i) $(DLGEVENT) != CONTINUE
3058: Set Result = STATUS_WANTRAS
3059: Endif
3060:
3061: ui pop 1
3062: Return $(Result)
3063:
3064:
3065:
3066:
3067:
3068:
3069:
3070:
3071:
3072:
3073:
3074:
3075:
3076:
3077:
3078:
3079:
3080:
3081:
3082:
3083:
3084:
3085:
3086:
3087:
3088:
3089:
3090:
3091:
3092:
3093:
3094:
3095:
3096:
3097:
3098:
3099:
3100:
3101:
3102:
3103:
3104:
3105:
3106:
3107:
3108:
3109:
3110:
3111:
3112:
3113:
3114:
3115: ;****************************************************************************
3116: ; *
3117: ; Network File Installation *
3118: ; *
3119: ;****************************************************************************
3120: [Install-All-Files-Now]
3121: set !STF_NCPA_FLASH_COPYLIST = TRUE
3122: CopyFilesInCopyList
3123: exit
3124:
3125:
3126:
3127:
3128:
3129:
3130:
3131:
3132:
3133:
3134:
3135:
3136:
3137:
3138:
3139:
3140:
3141:
3142: ;***********************************************************************************************
3143: ;
3144: ; File Lists
3145: ;
3146: ;
3147: ; Network INF files must already be present on the drive when this INF is run.
3148: ;
3149: ;***********************************************************************************************
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.