Annotation of mstools/rpc_dos/disk1/rpcsdk.mst, revision 1.1.1.3

1.1       root        1: '***********************************************************************
                      2: '*                       RPC SDK Install
                      3: '*                   Copyright (C) - 1992 by Microsoft
                      4: '*
                      5: '*                      Written By - Steven Zeck
                      6: '**************************************************************************
                      7: 
                      8: '$DEFINE NODEBUG  ''Define for script development/debugging
                      9: 
                     10: '$INCLUDE 'setupapi.inc'
                     11: '$INCLUDE 'msdetect.inc'
                     12: 
                     13: CONST TRUE = -1
                     14: CONST FALSE = 0
                     15: 
                     16: ''Dialog ID's
                     17: CONST ASKQUIT       = 200
                     18: CONST DlgGetPath    = 310
                     19: CONST HlpGetPath    = 311
                     20: CONST DlgRegPath    = 1700
                     21: CONST HlpRegPath    = 1701
                     22: CONST DlgDosPath    = 2000
                     23: CONST HlpDosPath    = 2001
                     24: CONST EXITFAILURE   = 400
                     25: CONST EXITQUIT      = 600
                     26: 
                     27: ' Conditionaly set the dialogs for full SDK versus runtime only.
                     28: 
                     29: '$ifndef RUNTIMEINSTALL
                     30: 
                     31: CONST DlgWelcome    = 100
                     32: CONST DlgInstallOptions = 800
                     33: CONST HlpInstallOptions = 801
1.1.1.3 ! root       34: CONST DlgNSInstallOptions = 802
        !            35: CONST HlpNSInstallOptions = 803
1.1       root       36: CONST EXITSUCCESS   = 700
                     37: '$else
                     38: CONST DlgWelcome    = 2600
                     39: CONST DlgInstallOptions = 2400
                     40: CONST HlpInstallOptions = 2401
1.1.1.3 ! root       41: CONST DlgNSInstallOptions = 802
        !            42: CONST HlpNSInstallOptions = 803
1.1       root       43: CONST EXITSUCCESS   = 2800
                     44: 
                     45: '$endif
                     46: 
                     47: CONST DlgSdkOption  = 1200
                     48: CONST HlpSdkOption  = 1201
                     49: CONST DlgRuntimeOption = 1400
                     50: CONST HlpRuntimeOption = 1401
                     51: CONST DlgTransport     = 1600
                     52: CONST HlpTransport     = 1601
                     53: CONST DlgNetBiosOptions        = 2200
                     54: CONST HlpNetBiosOptions        = 2201
                     55: CONST DlgNetBiosProtocols = 2300
                     56: CONST HlpNetBiosProtocols = 2301
                     57: CONST DlgNewProtocol = 2100
                     58: CONST HlpNewProtocol = 2101
1.1.1.3 ! root       59: CONST DlgNewNS = 2150
1.1       root       60: CONST DlgAutoPath = 2400
                     61: CONST HlpAutoPath = 2401
                     62: CONST BADPATH       = 6400
                     63: 
                     64: ''Bitmap ID
                     65: CONST LOGO = 1
                     66: 
                     67: CONST LanType_LANMAN = 6
                     68: 
                     69: Type LAN_DETECT
                     70:     iType As Integer
                     71:     iMajor As Integer
                     72:     iMinor As Integer
                     73:     iRev   As Integer
                     74:     fEnhance As Integer
                     75: End Type
                     76: 
                     77: GLOBAL BasePath$        ''Default destination directory.
                     78: GLOBAL RegPath$                ''Default destination directory.
                     79: GLOBAL DosPath$                ''Default destination directory.
                     80: Global CustomInstall   ''Custom install option
1.1.1.3 ! root       81: Global CustomNSInstall ''Custom Name Service install option
1.1       root       82: Global SrcDir$
                     83: Global AllTransports
                     84: Global MSDOSRuntime
                     85: Global MSDOSSDK
                     86: Global WindowsRuntime
                     87: Global WindowsSDK
                     88: Global NetBiosTransport
                     89: Global SamplesSDK
                     90: Global HelpFiles
                     91: GLOBAL CUIDLL$
                     92: GLOBAL HELPPROC$
1.1.1.3 ! root       93: Global ThreeEightySixEnh
        !            94: Global ThreeEightySixEnhStr$
        !            95: Global TCP
1.1       root       96: 
                     97: DECLARE Function GetPath(Dialog%, Path$) AS INTEGER
                     98: DECLARE FUNCTION GetTransport() As INTEGER
                     99: DECLARE Sub CopyList(ListIn$, ListOut$, Truncate%)
                    100: DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
                    101: DECLARE FUNCTION GetCheck (index%) AS INTEGER
                    102: DECLARE FUNCTION BoolToOnOff (Bool%) AS String
                    103: DECLARE FUNCTION GetWinRunSize () AS String
                    104: DECLARE FUNCTION GetWinSize () AS String
                    105: DECLARE FUNCTION GetDosSize () AS String
                    106: DECLARE FUNCTION GetDosRunSize () AS String
                    107: DECLARE FUNCTION GetHlpSize () AS String
                    108: DECLARE FUNCTION GetSampleSize () AS String
                    109: DECLARE FUNCTION GetTransportSize () AS String
                    110: DECLARE FUNCTION FormatSize ()AS String
                    111: 
                    112: 
                    113: INIT:
                    114:     CUIDLL$ = "mscuistf.dll"            ''Custom user interface dll
1.1.1.2   root      115:     HELPPROC$ = "FHelpDlgProc"         ''Help dialog procedure
1.1       root      116: 
                    117:     SetBitmap CUIDLL$, LOGO
1.1.1.2   root      118:     SetTitle "RPC - Software Development Kit Install"
1.1       root      119: 
                    120:     szInf$ = GetSymbolValue("STF_SRCINFPATH")
                    121:     if szInf$ = "" THEN
                    122:         szInf$ = GetSymbolValue("STF_CWDDIR") + "RPCSDK.INF"
                    123:     end if
                    124:     ReadInfFile szInf$
1.1.1.2   root      125:     SetAbout "RPC SDK Install", "By stevez - Version 0.09"
1.1       root      126: 
                    127:     CustomInstall = FALSE
1.1.1.3 ! root      128:     CustomNSInstall = FALSE
1.1       root      129:     AllTransports = TRUE
                    130:     MSDOSRuntime = TRUE
1.1.1.3 ! root      131:     ThreeEightySixEnh = FALSE
        !           132:     TCP = FALSE
        !           133:     ThreeEightySixEnhStr$="[386Enh]"
        !           134: 
1.1       root      135: 
                    136: '$ifndef WINDOWS_ONLY
                    137:     MSDOSSDK = TRUE
                    138: '$endif
                    139: 
                    140: '$ifndef MSDOS_ONLY
                    141:     WindowsRuntime = TRUE
                    142: '$endif
                    143: 
                    144:     WindowsSDK = TRUE
                    145:     NetBiosTransport = TRUE
                    146:     SamplesSDK = TRUE
                    147:     HelpFiles = TRUE
                    148: 
                    149:     Dim Detect As LAN_DETECT
                    150:     BasePath$ = "C:\c700"
                    151:     RegPath$="C:\"
                    152:     DosPath$="C:\DOS"
                    153:     WinPath$=GetWindowsDir
                    154:     SrcDir$ = GetSymbolValue("STF_SRCDIR")
                    155: 
                    156:     ' If the path contains lanman, make that the default DOS DLL directory.
                    157: 
                    158:     path$ = Ucase$(GetEnvVariableValue ("PATH"))+";"
                    159: 
                    160:     i% = 1
                    161:     while i% < len(path$)
                    162: 
                    163:        iEnd = instr(i%, path$, ";")
                    164:        cPath$ = mid$(path, i%, iEnd - i%)
                    165: 
                    166:        if instr (cPath$, "LANMAN") or instr(cPath$, "\NETPROG") then
                    167:          DosPath$ = cPath$
                    168:        end if
                    169: 
                    170:        if instr (cPath$, "\C700\") then
                    171:          BasePath$ = mid$(cPath$, 1, 1)+":\C700"
                    172:        end if
                    173: 
                    174:        i% = iEnd + 1
                    175:     wend
                    176: 
                    177: 
                    178: '$ifdef DEBUG
                    179: 
1.1.1.2   root      180:     SrcDir$ = "\install\sdk.new\nsetup"
1.1       root      181: '    DosPath$="C:\c700\DOS"
                    182:     WinPath$="C:\c700\WIN"
                    183: 
                    184: '$endif ''DEBUG
                    185: 
                    186: WELCOME:
                    187:     sz$ = UIStartDlg(CUIDLL$, DlgWelcome, "FInfoDlgProc", 0, "")
                    188:     if sz$ = "CONTINUE" THEN
                    189:         UIPop 1
                    190:     else
                    191:         GOSUB ASKQUIT
                    192:         GOTO WELCOME
                    193:     end if
                    194: 
                    195: 
                    196: OPTION:
                    197:     if not CustomInstall then
                    198:        SetSymbolValue "RadioDefault", "1"
                    199:     else
                    200:        SetSymbolValue "RadioDefault", "2"
                    201:     end if
                    202: 
                    203: RESTART_OPTION:
1.1.1.3 ! root      204:     sz$ = UIStartDlg(CUIDLL$, DlgNSInstallOptions, "FRadioDlgProc", HlpNSInstallOptions, HELPPROC$)
        !           205:     Index$ = GetSymbolValue("ButtonChecked")
        !           206: 
        !           207:     if sz$ = "CONTINUE" THEN
        !           208:         UIPop(1)
        !           209:     elseif sz$ = "REACTIVATE" THEN
        !           210:        GOTO RESTART_OPTION
        !           211:     else
        !           212:         GOSUB ASKQUIT
        !           213:         GOTO OPTION
        !           214:     end if
        !           215: 
        !           216:     if Index$ = "2" then
        !           217:        i%=DoMsgBox("The only other supported name service provider is the DCE Cell Directory Service.", "DCE Name Service Provider.", MB_OK)
        !           218:        CustomNSInstall = TRUE
        !           219: 
        !           220:        NSProt$     = "\Protocol=ncacn_ip_tcp"
        !           221:        NSEndpoint$ = "\Endpoint="
        !           222:        NSDefaultSyntax$  = "\DefaultSyntax=3"
        !           223: 
        !           224:        'The following has to be handled by a dialog box.
        !           225: NEWNS:
        !           226:        sz$ = UIStartDlg(CUIDLL$, DlgNewNS, "FNameOrgDlgProc", HlpNewProtocol, HELPPROC$)
        !           227:        UIPop (1)
        !           228: 
        !           229:        if sz$ = "CONTINUE" then
        !           230:            t$ = GetSymbolValue("NameOut")
        !           231:             if t$ = "" then
        !           232:                i% = DoMsgBox("You must enter a valid Network Address.", "Custom Name Service Install", MB_OK+MB_TASKMODAL+MB_ICONHAND)
        !           233:                 goto NEWNS
        !           234:             end if
        !           235: 
        !           236:            NSNetworkAddress$ = "\NetworkAddress="+t$
        !           237: 
        !           238:            t$ = GetSymbolValue("OrgOut")
        !           239:             if t$ = "" then
        !           240:                i% = DoMsgBox("You must enter a valid Server Network Address.", "Custom Name Service Install", MB_OK+MB_TASKMODAL+MB_ICONHAND)
        !           241:                 goto NEWNS
        !           242:             end if
        !           243:            NSServerNetworkAddress$ = "\ServerNetworkAddress="+t$
        !           244:        else
        !           245:            GOTO RESTART_OPTION
        !           246:        end if
        !           247:     else
        !           248:        CustomNSInstall = FALSE
        !           249:         NSProt$              = "\Protocol=ncacn_np"
        !           250:         NSNetworkAddress$ = "\NetworkAddress=\\."
        !           251:         NSEndpoint$       = "\Endpoint=\pipe\locator"
        !           252:        NSDefaultSyntax$  = "\DefaultSyntax=3"
        !           253:     end if
        !           254: 
1.1       root      255:     sz$ = UIStartDlg(CUIDLL$, DlgInstallOptions, "FRadioDlgProc", HlpInstallOptions, HELPPROC$)
                    256:     Index$ = GetSymbolValue("ButtonChecked")
                    257: 
                    258:     if sz$ = "CONTINUE" THEN
                    259:         UIPop(1)
                    260:     elseif sz$ = "REACTIVATE" THEN
                    261:        GOTO RESTART_OPTION
                    262:     else
                    263:         GOSUB ASKQUIT
                    264:         GOTO OPTION
                    265:     end if
                    266: 
                    267:     if Index$ = "2" then
                    268:        CustomInstall = TRUE
                    269:     else
                    270:        CustomInstall = FALSE
                    271: 
                    272: '$ifndef RUNTIMEINSTALL
                    273:        i% = GetPath(DlgGetPath, BasePath$)
                    274: '$else
                    275:        i% = GetPath(DlgDosPath, DosPath$)
                    276: '$endif
                    277: 
                    278:        if i% then
1.1.1.2   root      279:            goto NETBIOS
                    280: 
                    281:            ' If you want to default to netbios always, remove
                    282:            ' the preceeding goto.  This removes an additional dialog.
                    283: 
                    284:            AddListItem "NetBiosMap", "nb=0"
1.1       root      285:            goto FullInstall
                    286:        else
                    287:            goto OPTION
                    288:        end if
                    289:     end if
                    290: 
                    291: 
1.1.1.3 ! root      292: 
1.1       root      293: '$ifndef RUNTIMEINSTALL
                    294: 
                    295: SDK_OPTION:
                    296: 
                    297:     RemoveSymbol "CheckItemsState"
                    298:     RemoveSymbol "DriveStatusText"
                    299: 
                    300:     AddListItem "CheckItemsState", BoolToOnOff(SamplesSDK )
                    301:     AddListItem "CheckItemsState", BoolToOnOff(MSDOSSDK)
                    302:     AddListItem "CheckItemsState", BoolToOnOff(WindowsSDK )
                    303:     AddListItem "CheckItemsState", BoolToOnOff(HelpFiles)
                    304: 
                    305:     AddListItem "DriveStatusText", BasePath$
                    306: 
                    307: RESTART_SDK_OPTION:
                    308: 
                    309:     RemoveSymbol "StatusItemsText"
                    310:     AddListItem "StatusItemsText", GetDosSize()
                    311:     AddListItem "StatusItemsText", GetWinSize()
                    312:     AddListItem "StatusItemsText", GetSampleSize()
                    313:     AddListItem "StatusItemsText", GetHlpSize()
                    314: 
                    315:     sz$ = UIStartDlg(CUIDLL$, DlgSdkOption, "FCustInstDlgProc", HlpSdkOption, HELPPROC$)
                    316:     
                    317:     if sz$ = "CONTINUE" THEN
                    318:         UIPop(1)
                    319: 
                    320:     elseif sz$ = "BACK" THEN
                    321:         UIPop(1)
                    322:        GOTO OPTION
                    323: 
                    324:     elseif sz$ = "REACTIVATE" THEN
                    325:        GOTO RESTART_SDK_OPTION
                    326: 
                    327:     elseif sz$ = "PATH" THEN
                    328: 
                    329:        i% = GetPath(DlgGetPath ,BasePath$)
                    330:        ReplaceListItem "DriveStatusText", 1, BasePath$
                    331:        GOTO RESTART_SDK_OPTION
                    332: 
                    333:     elseif sz$ = "CHK1" THEN
                    334: 
                    335:        SamplesSDK = GetCheck(1)
                    336:        GOTO RESTART_SDK_OPTION
                    337: 
                    338:     elseif sz$ = "CHK2" THEN
                    339: 
                    340:        MSDOSSDK = GetCheck(2)
                    341:        GOTO RESTART_SDK_OPTION
                    342: 
                    343:     elseif sz$ = "CHK3" THEN
                    344: 
                    345:        WindowsSDK = GetCheck(3)
                    346:        GOTO RESTART_SDK_OPTION
                    347: 
                    348:     elseif sz$ = "CHK4" THEN
                    349: 
                    350:        HelpFiles = GetCheck(4)
                    351:        GOTO RESTART_SDK_OPTION
                    352: 
                    353:     else
                    354:         GOSUB ASKQUIT
                    355:        GOTO RESTART_SDK_OPTION
                    356:     end if
                    357: 
                    358:     MSDOSRuntime = MSDOSSDK
                    359:     WindowsRuntime = WindowsSDK
                    360: 
                    361:     if MSDOSSDK = FALSE and WindowsSDK = FALSE then
1.1.1.3 ! root      362:        goto FullInstall
1.1       root      363: 
                    364:     end if
1.1.1.3 ! root      365: 
1.1       root      366: '$endif
                    367: 
                    368: RUNTIME_OPTION:
                    369: 
                    370:     RemoveSymbol "CheckItemsState"
                    371: 
                    372:     AddListItem "CheckItemsState", BoolToOnOff(MSDOSRuntime)
                    373:     AddListItem "CheckItemsState", BoolToOnOff(WindowsRuntime)
                    374:     AddListItem "CheckItemsState", BoolToOnOff(AllTransports)
                    375: 
                    376: RESTART_RUNTIME_OPTION:
                    377: 
                    378:     RemoveSymbol "StatusItemsText"
                    379: 
                    380:     AddListItem "StatusItemsText", RegPath$
                    381:     AddListItem "StatusItemsText", DosPath$
                    382:     AddListItem "StatusItemsText", GetDosRunSize()
                    383:     AddListItem "StatusItemsText", GetWinRunSize()
                    384:     AddListItem "StatusItemsText", GetTransportSize()
                    385: 
                    386:     sz$ = UIStartDlg(CUIDLL$, DlgRuntimeOption, "FCustInstDlgProc", HlpRuntimeOption, HELPPROC$)
                    387:     
                    388:     if sz$ = "CONTINUE" THEN
                    389:         UIPop(1)
                    390: 
                    391:     elseif sz$ = "BACK" THEN
                    392:         UIPop(1)
                    393: 
                    394: '$ifndef RUNTIMEINSTALL
                    395: 
                    396:        GOTO SDK_OPTION
                    397: '$else
                    398:        GOTO OPTION
                    399: '$endif
                    400: 
                    401:     elseif sz$ = "REACTIVATE" THEN
                    402:        GOTO RESTART_RUNTIME_OPTION
                    403: 
                    404:     elseif sz$ = "CHK1" THEN
                    405:        MSDOSRuntime = GetCheck(1)
                    406:        GOTO RESTART_RUNTIME_OPTION
                    407: 
                    408:     elseif sz$ = "CHK2" THEN
                    409:        WindowsRuntime = GetCheck(2)
                    410:        GOTO RESTART_RUNTIME_OPTION
                    411: 
                    412:     elseif sz$ = "CHK3" THEN
                    413: 
                    414:        if GetListItem("CheckItemsState", 3) = "ON" then
                    415:            AllTransports = TRUE
                    416:        else
                    417:            AllTransports = FALSE
                    418:            RemoveSymbol "SelectedTransports"
                    419:        end if
                    420: 
                    421:        GOTO RESTART_RUNTIME_OPTION
                    422: 
                    423:     elseif sz$ = "BTN1" THEN
                    424: 
                    425:        i% = GetPath(DlgRegPath ,RegPath$)
                    426:        ReplaceListItem "StatusItemsText", 1, RegPath$
                    427: 
                    428:        GOTO RESTART_RUNTIME_OPTION
                    429: 
                    430:     elseif sz$ = "BTN2" THEN
                    431: 
                    432:        i% = GetPath(DlgDosPath ,DosPath$)
                    433:        ReplaceListItem "StatusItemsText", 2, DosPath$
                    434: 
                    435:        GOTO RESTART_RUNTIME_OPTION
                    436: 
                    437:     elseif sz$ = "BTN3" THEN
                    438: 
                    439: 
                    440:        if GetTransport() and AllTransports then
                    441:            Alltransports = FALSE
                    442:            ReplaceListItem "CheckItemsState", 3, "OFF"
                    443:        end if
                    444: 
                    445:        GOTO RESTART_RUNTIME_OPTION
                    446: 
                    447:     else
                    448:         GOSUB ASKQUIT
                    449:        GOTO RESTART_RUNTIME_OPTION
                    450: 
                    451:     end if
                    452: 
                    453:     NetBiosTransport = AllTransports
                    454: 
                    455:     ' Scan the selected transport for a NetBios name
                    456: 
                    457:     for i% = 1 to GetListLength("SelectedTransports") step 1
                    458: 
                    459:        if instr(GetListItem("SelectedTransports", i%), "NetBios") then
                    460:            NetBiosTransport = TRUE
                    461:        end if
                    462:     next
                    463: 
                    464: 
                    465:     if not NetBiosTransport then
                    466:        goto FullInstall
                    467:     end if
                    468: 
                    469: NETBIOS:
                    470:     SetSymbolValue "RadioDefault", "1"
                    471: 
                    472: RESTART_NETBIOS_OPTION:
                    473:     sz$ = UIStartDlg(CUIDLL$, DlgNetBiosOptions, "FRadioDlgProc", HlpNetBiosOptions, HELPPROC$)
                    474:     Index$ = GetSymbolValue("ButtonChecked")
                    475: 
                    476:     if sz$ = "CONTINUE" THEN
                    477:         UIPop(1)
                    478:     elseif sz$ = "REACTIVATE" THEN
                    479:        GOTO RESTART_NETBIOS_OPTION
                    480: 
                    481:     elseif sz$ = "BACK" THEN
1.1.1.2   root      482: 
                    483:         UIPop(1)
                    484:        if CustomInstall then
                    485:           GOTO RUNTIME_OPTION
                    486:        else
                    487:           goto RESTART_OPTION
                    488:        end if
1.1       root      489: 
                    490:     else
                    491:         GOSUB ASKQUIT
                    492:        GOTO NETBIOS
                    493:     end if
                    494: 
1.1.1.2   root      495: 
1.1       root      496:     if Index$ = "1" then
1.1.1.2   root      497: 
                    498:        AddListItem "NetBiosMap", "nb=0"
                    499:        goto FullInstall
                    500: 
                    501:     elseif Index$ = "2" then
                    502: 
1.1.1.3 ! root      503:        AddListItem "NetBiosMap", "tcp=0"
        !           504:        TCP = TRUE
1.1       root      505:        goto FullInstall
1.1.1.2   root      506: 
1.1       root      507:     end if
                    508: 
                    509: 
                    510: NETBIOS_PROTOCOL:
                    511: 
                    512:     RemoveSymbol "ListItemsIn"
                    513: 
                    514: RESTART_NETBIOS_PROTOCOL:
                    515:     sz$ = UIStartDlg(CUIDLL$, DlgNetBiosProtocols, "FListDlgProc", HlpNetBiosProtocols, HELPPROC$)
                    516:     
                    517:     if sz$ = "CONTINUE" THEN
                    518:        UIPop 1
                    519: 
                    520:     elseif sz$ = "REACTIVATE" THEN
                    521:        GOTO RESTART_NETBIOS_OPTION
                    522: 
                    523:     elseif sz$ = "BACK" THEN
                    524: 
                    525: GET_LANA:
                    526:        sz$ = UIStartDlg(CUIDLL$, DlgNewProtocol, "FNameOrgDlgProc", HlpNewProtocol, HELPPROC$)
                    527: 
                    528:        if sz$ = "CONTINUE" then
1.1.1.3 ! root      529:            t$ = GetSymbolValue("NameOut")
        !           530: 
        !           531:            if mid$(t$,1) <> "nb" and mid$(t$, 1) <> "tcp" and mid$(t$, 1) <> "ipx" then
        !           532:                i% = DoMsgBox("The protocol string must be nb, tcp or ipx.", "NetBios Protocol", MB_OK+MB_TASKMODAL+MB_ICONHAND)
        !           533:                goto GET_LANA
        !           534:            endif
1.1       root      535: 
                    536:            t$ = GetSymbolValue("OrgOut")
                    537: 
                    538:            if len(t$) <> 1 or mid$(t$, 1) < "0" or mid$(t$, 1) > "9" then
                    539:                i% = DoMsgBox("Bad value for Lana #, use 0 to 9", "NetBios Protocol", MB_OK+MB_TASKMODAL+MB_ICONHAND)
                    540:                goto GET_LANA
                    541:            else
1.1.1.3 ! root      542:                NewProto$ = GetSymbolValue("NameOut")
        !           543:                if mid$(NewProto$,1) = "tcp" then
        !           544:                    TCP = TRUE
        !           545:                    NewProto$="tcp=" + t$
        !           546:                elseif mid$(NewProto$,1) = "ipx" then
        !           547:                         NewProto$="ipx=" + t$
        !           548:                else
        !           549:                    NewProto$ = GetSymbolValue("NameOut") + "=" + t$
        !           550:                endif
        !           551: 
        !           552:                for i% = 1 to GetListLength("ListItemsIn") step 1
        !           553:                    t$ = GetListItem("ListItemsIn", i%)
        !           554:                    if t$ = NewProto$   then
        !           555:                        goto SKIP_NEWPROTO_ADD
        !           556:                    end if
        !           557:                next
1.1       root      558: 
1.1.1.3 ! root      559:                AddListItem "ListItemsIn", NewProto$
1.1       root      560:            end if
1.1.1.3 ! root      561: SKIP_NEWPROTO_ADD:
1.1       root      562:        end if
                    563: 
                    564:        UIPop (2)
                    565:        GOTO RESTART_NETBIOS_PROTOCOL
                    566: 
                    567:     elseif sz$ = "CANCEL" THEN
                    568:        UIPop (1)
                    569:        GOTO RESTART_NETBIOS_OPTION
                    570: 
                    571:     elseif sz$ = "EXIT" THEN
                    572: 
                    573:        OldProto$ = GetSymbolValue("ListItemsOut")
                    574:        RemoveSymbol "ListTmp"
                    575: 
                    576:        for i% = 1 to GetListLength("ListItemsIn") step 1
                    577:            if OldProto$ <> GetListItem("ListItemsIn", i%) then
                    578: 
                    579:                AddListItem "ListTmp", GetListItem("ListItemsIn", i%)
                    580:            end if
                    581:        next
                    582: 
                    583:        CopyList "ListItemsIn", "ListTmp", TRUE
                    584: 
                    585:        UIPop (2)
                    586:        GOTO RESTART_NETBIOS_PROTOCOL
                    587:     end if
                    588: 
1.1.1.3 ! root      589:     CopyList "NetBiosMap", "ListItemsIn", TRUE
1.1       root      590: 
                    591: 
                    592: FullInstall:
                    593: 
                    594:     group$ = "Microsoft C/C++ 7.0"
                    595: 
                    596: '$ifndef RUNTIMEINSTALL
                    597: 
                    598:     CreateDir BasePath$, cmoNone
1.1.1.3 ! root      599: 
1.1       root      600:     CreateDir MakePath(BasePath$, "rpc"), cmoNone
                    601: 
                    602:     AddSectionFilesToCopyList "Base", SrcDir$, MakePath(BasePath$, "rpc")
                    603: 
                    604: 
                    605:     ' Install the SDK files first.
                    606: 
                    607:     CreateDir MakePath(BasePath$, "include"), cmoNone
                    608: 
                    609:     AddSectionFilesToCopyList "include", SrcDir$, MakePath(BasePath$, "include")
                    610:     AddSectionFilesToCopyList "bin", SrcDir$, MakePath(BasePath$, "bin")
                    611: 
                    612:     if WindowsSDK then
                    613:        AddSectionFilesToCopyList "winclude", SrcDir$, MakePath(BasePath$, "include\win")
                    614:        AddSectionFilesToCopyList "wlib", SrcDir$, MakePath(BasePath$, "lib")
                    615: 
                    616:        CreateProgmanGroup group$, "", cmoNone
                    617:        ShowProgmanGroup group$, 1, cmoNone
                    618:        CreateProgmanItem  group$, "RPC ReadMe", "notepad "+MakePath(BasePath$, "rpc\readme.txt"), "", cmoOverWrite
                    619: 
                    620:     end if
                    621: 
                    622:     if MSDOSSDK then
                    623:        AddSectionFilesToCopyList "dinclude", SrcDir$, MakePath(BasePath$, "include\dos")
                    624:        AddSectionFilesToCopyList "dlib", SrcDir$, MakePath(BasePath$, "lib")
                    625:     end if
                    626: 
                    627:     if SamplesSDK then
                    628: 
1.1.1.3 ! root      629:        if HelpFiles then
1.1       root      630:            AddSectionFilesToCopyList "wHelp", SrcDir$, MakePath(BasePath$, "help")
                    631: 
1.1.1.3 ! root      632:            CreateProgmanItem group$, "RPC Reference", "winhelp "+MakePath(BasePath$, "help\rpc.hlp"), "", cmoOverWrite
1.1       root      633:        end if
                    634: 
                    635:        CreateDir MakePath(BasePath$, "rpc\samples"), cmoNone
                    636: 
1.1.1.3 ! root      637:        if SamplesSDK then
1.1       root      638:            AddSectionFilesToCopyList "wsample2", SrcDir$, MakePath(BasePath$, "rpc\samples\whello")
                    639:            AddSectionFilesToCopyList "wsample11", SrcDir$, MakePath(BasePath$, "rpc\samples\mandel")
                    640: 
                    641:            CreateDir MakePath(BasePath$, "rpc\samples\data"), cmoNone
                    642:            CreateDir MakePath(BasePath$, "rpc\samples\handles"), cmoNone
                    643: 
1.1.1.3 ! root      644:            AddSectionFilesToCopyList "sample0", SrcDir$, MakePath(BasePath$, "rpc\samples")
1.1       root      645:            AddSectionFilesToCopyList "sample1", SrcDir$, MakePath(BasePath$, "rpc\samples\hello")
                    646:            AddSectionFilesToCopyList "sample3", SrcDir$, MakePath(BasePath$, "rpc\samples\data\dunion")
                    647:            AddSectionFilesToCopyList "sample4", SrcDir$, MakePath(BasePath$, "rpc\samples\data\inout")
                    648:            AddSectionFilesToCopyList "sample5", SrcDir$, MakePath(BasePath$, "rpc\samples\data\xmit")
                    649:            AddSectionFilesToCopyList "sample6", SrcDir$, MakePath(BasePath$, "rpc\samples\doctor")
                    650:            AddSectionFilesToCopyList "sample7", SrcDir$, MakePath(BasePath$, "rpc\samples\handles\auto")
                    651:            AddSectionFilesToCopyList "sample8", SrcDir$, MakePath(BasePath$, "rpc\samples\handles\cxhndl")
                    652:            AddSectionFilesToCopyList "sample9", SrcDir$, MakePath(BasePath$, "rpc\samples\handles\usrdef")
                    653:            AddSectionFilesToCopyList "sample10",SrcDir$, MakePath(BasePath$, "rpc\samples\dict")
1.1.1.3 ! root      654:            AddSectionFilesToCopyList "sample12",SrcDir$, MakePath(BasePath$, "rpc\samples\callback")
        !           655:            AddSectionFilesToCopyList "sample13",SrcDir$, MakePath(BasePath$, "rpc\samples\ns\nhello")
        !           656:            AddSectionFilesToCopyList "sample14",SrcDir$, MakePath(BasePath$, "rpc\samples\yield")
        !           657:            AddSectionFilesToCopyList "sample15",SrcDir$, MakePath(BasePath$, "rpc\samples\cluuid")
        !           658:            AddSectionFilesToCopyList "sample16",SrcDir$, MakePath(BasePath$, "rpc\samples\ns\cds")
        !           659: 
1.1       root      660: 
                    661:        end if
                    662: 
                    663:     end if
                    664: 
                    665: '$endif
                    666: 
                    667: 
                    668:     ' Update the list of transports to install.
                    669: 
                    670:     if AllTransports then
1.1.1.3 ! root      671:        TCP = TRUE
1.1       root      672:        RemoveSymbol "SelectedTransports"
                    673:     end if
                    674: 
                    675:     if WindowsRuntime then
                    676:        AddSectionFilesToCopyList "wruntime", SrcDir$, MakePath(WinPath$, "system")
                    677: 
1.1.1.3 ! root      678:        WinSysPath$ = GetWindowsSysDir()
1.1       root      679: 
1.1.1.2   root      680:        verdllPath$ = FindFileInTree("ver.dll", WinSysPath$)
1.1       root      681: 
1.1.1.2   root      682:        if verdllPath$ = "" then
                    683:            AddSectionFilesToCopyList "wruntime", SrcDir$, WinSysPath$
                    684:        endif
                    685: 
1.1.1.3 ! root      686:        'Handle installation of netapi.dll variants.
1.1.1.2   root      687:        NetapiPath$ = FindTargetOnEnvVar("netapi.dll", "PATH")
                    688: 
1.1.1.3 ! root      689:        'Lanman Environments. Be sure not to overwrite NT WOW netapi.dll
1.1.1.2   root      690:        if NetapiPath$ <> "" then
1.1.1.3 ! root      691:            if instr (NetapiPath$, "SYSTEM32")= 0 then
        !           692:                i% = DoMsgBox("If your netapi.dll is an older version, it will be renamed to netapi.old and a newer version installed.", "Note on Netapi.dll", MB_OK)
        !           693:                AddSectionFilesToCopyList "wnetapi", SrcDir$, mid$(NetapiPath$, 1, len(NetapiPath$) - len("\netapi.dll"))
        !           694:                BackupFile NetapiPath$, "netapi.old"
        !           695:            end if
        !           696: 
1.1       root      697:        else
1.1.1.3 ! root      698:        'NON Lanman Environments
        !           699:            WinballNetapiPath$ = FindFileInTree("netapi.dll", WinSysPath$)
        !           700:            if WinballNetapiPath$ = "" then
1.1.1.2   root      701:                AddSectionFilesToCopyList "dummynetapi", SrcDir$, WinSysPath$
                    702:            else
1.1.1.3 ! root      703:                l& = GetSizeOfFile(WinballNetapiPath$)
        !           704:                    if l > 2000 then
        !           705:                        i% = DoMsgBox("Setup assumes you are running Windows For WorkGroups, so netapi.dll won't be updated.", "Note on Netapi.dll", MB_OK)
        !           706:                    end if
        !           707:            end if
        !           708:        end if
        !           709: 
        !           710: 
        !           711:        ' See if NEW tcp transport .dll is around. If not, copy OLD interface.
        !           712:        if TCP then
        !           713:            NewTcpDllPath$ = FindFileInTree("winsock.dll", WinPath$)
        !           714: 
        !           715:            if NewTcpDllPath$ = "" then
        !           716:            NewTcpDllPath$ = FindTargetOnEnvVar("winsock.dll", "PATH")
        !           717:            end if
        !           718: 
        !           719:            if NewTcpDllPath$ = "" then
        !           720:                AddSectionFilesToCopyList "oldtcpwin", SrcDir$, WinSysPath$
        !           721:            else
        !           722:                AddSectionFilesToCopyList "newtcpwin", SrcDir$, WinSysPath$
        !           723:            end if
1.1       root      724:        end if
                    725: 
                    726:        if AllTransports then
                    727:            MakeListFromSectionKeys "SelectedTransports", "wtrans"
                    728:        end if
1.1.1.2   root      729: 
1.1       root      730:     end if
                    731: 
                    732:     if MSDOSRuntime then
                    733: 
                    734:        CreateDir DosPath$, cmoNone
                    735:        AddSectionFilesToCopyList "druntime", SrcDir$, DosPath$
                    736: 
                    737:        if AllTransports then
                    738:            MakeListFromSectionKeys "ListTmp", "dtrans"
                    739:            CopyList "SelectedTransports", "ListTmp", FALSE
                    740:        end if
                    741: 
                    742:     end if
                    743: 
                    744: 
                    745:     ' For each transport selected, add to the DOS or Windows copylist.
                    746: 
                    747:     for i% = 1 to GetListLength("SelectedTransports") step 1
                    748: 
                    749:        tran$ = GetListItem("SelectedTransports", i%)
                    750: 
                    751:        if instr (tran$, "DOS") then
                    752:            AddSectionKeyFileToCopyList "dtrans", tran$, SrcDir$, DosPath$
                    753:        else
                    754:            AddSectionKeyFileToCopyList "wtrans", tran$, SrcDir$, MakePath(WinPath$, "system")
                    755: 
                    756:        end if
                    757:     next
                    758: 
                    759: 
                    760:     ' Now write the registry file with the NSI values and the
                    761:     ' transport to protocol mappings.
                    762: 
1.1.1.3 ! root      763:     KeyPrefix$       = "\Root\Software\Microsoft\Rpc"
        !           764:     NameService$      =        KeyPrefix$+"\NameService"
1.1       root      765: 
                    766:     CreateDir RegPath$, cmoNone
                    767:     Open MakePath(RegPath$, "rpcreg.dat") for Output As 1
                    768: 
1.1.1.3 ! root      769:     if CustomNSInstall = TRUE then
        !           770:     print #1, NameService$+NSServerNetworkAddress$
        !           771:     end if
        !           772: 
        !           773:     print #1, NameService$+NSProt$
        !           774:     print #1, NameService$+NSNetworkAddress$
        !           775:     print #1, NameService$+NSEndpoint$
        !           776:     print #1, NameService$+NSDefaultSyntax$
        !           777: 
1.1       root      778: 
                    779:     ' For each transport add the mapping for the protocols.
                    780: 
                    781:     for i% = 1 to GetListLength("SelectedTransports") step 1
                    782: 
                    783:        tran$ = GetListItem("SelectedTransports", i%)
                    784: 
                    785:        Start = instr(tran$, "(")+1
                    786:        mapping$ = mid$(tran$, Start, len(tran$) - Start)
                    787: 
                    788:        'Since we have DOS and windows mappings, there can be duplicates
                    789:        'make sure the mapping is only added once.
                    790: 
                    791:        for n% = 1 to GetListLength("MappedProtocols") step 1
                    792:            if mapping$ = GetListItem("MappedProtocols", n%) then
                    793:               goto NextMapping
                    794:            end if
                    795:        next
                    796: 
                    797:        AddListItem "MappedProtocols", mapping$
                    798: 
                    799:        ' NetBios protocols get special mappings for each protocol
1.1.1.3 ! root      800:        ' The ClientProtocols are now hardcoded for ip_tcp, dnet_nsp and nb_nb.
1.1       root      801: 
                    802:        if instr(mapping$, "rpcltc5") then
                    803:            for n% = 1 to GetListLength("NetBiosMap") step 1
                    804: 
                    805:                NbMap$ = GetListItem("NetBiosMap", n%)
                    806:                prot$ = mid$(NbMap$, 1, instr(NbMap$, "=")-1)
                    807:                dll$ =  mid$(mapping$, instr(mapping$, "="))
                    808: 
1.1.1.3 ! root      809:                 if prot$ <> "nb" then
        !           810:                    print #1, KeyPrefix$+"\ClientProtocols\ncacn_nb_"+prot$+dll$
        !           811:                 end if
        !           812: 
1.1       root      813:            next
1.1.1.3 ! root      814:        'else
        !           815:        '    print #1, KeyPrefix$+"\ClientProtocols\ncacn_"+mapping$
1.1       root      816:        end if
                    817: 
                    818: NextMapping:
                    819:     next
                    820: 
                    821: 
                    822:    'For NetBios, build the protocol to lan adapter mappings.
                    823: 
                    824:     if NetBiosTransport then
                    825:        for n% = 1 to GetListLength("NetBiosMap") step 1
                    826: 
                    827:            NbMap$ = GetListItem("NetBiosMap", n%)
                    828:            prot$ = mid$(NbMap$, 1, instr(NbMap$, "=")-1) + "0"
                    829:            lana$ = mid$(NbMap$, instr(NbMap$, "="))
                    830: 
                    831:            print #1, KeyPrefix$+"\NetBios\ncacn_nb_"+prot$+lana$
                    832:        next
                    833:     end if
                    834: 
                    835:     Close #1
                    836: 
1.1.1.3 ! root      837:     ' See if we are installing in nt. The string NtDir is used for system.ini update too.
        !           838: 
        !           839:     NtDir$ = WinPath$ + "system32"
        !           840: 
1.1       root      841:     ' Update the users autoexec file if needed.
                    842: 
                    843:     AutoExec$ = "C:\"
                    844: 
                    845:     if UCase$(RegPath$) <> "C:\" and GetEnvVariableValue ("RPC_REG_DATA_FILE") <> UCase$(RegPath$) then
                    846:        UpdateReg = TRUE
                    847:     else
                    848:        UpdateReg = FALSE
                    849:     end if
                    850: 
1.1.1.3 ! root      851:     UpdatePath = TRUE
1.1       root      852: 
                    853:     if MSDOSRuntime then
                    854: 
1.1.1.3 ! root      855: '       i% = DoMsgBox("Path: "+path$, "DOS path: "+DosPath$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
1.1       root      856: 
                    857:        if instr(path$, Ucase$(DosPath$)) = 0 then
                    858:            UpdatePath = TRUE
                    859:        end if
                    860:     end if
                    861: 
                    862:     if UpdateReg or UpdatePath then
                    863: 
                    864:        ' Get the path to the autoexec file if not in "C:\"
                    865: 
                    866:        AutoExec$ = AutoExec$+"Autoexec.bat"
                    867: 
1.1.1.3 ! root      868:        newPath$ = "SET PATH=%PATH%;"+DosPath$
        !           869: 
        !           870:        if DoesFileExist(AutoExec$, femExists) = 0 then
1.1       root      871: 
1.1.1.3 ! root      872:        i% = DoMsgBox("No Autoexec.bat found !!!, "+ AutoExec$ + " needs to be created. Do you want to create this file?", "Create "+ AutoExec$, 4+MB_TASKMODAL+32)
        !           873: 
        !           874:            if i% = 6 then
        !           875:                Open AutoExec$ for Output As 1
        !           876:                print #1, ""
        !           877:                close #1
        !           878:                i% = DoMsgBox("An updated "+AutoExec$+" is in the file "+AutoExec$, "New Autoexec.bat", MB_OK+MB_TASKMODAL)
1.1       root      879:            end if
                    880: 
1.1.1.3 ! root      881:        end if
        !           882: 
1.1       root      883: 
                    884:        ' Insert the new information by merging the new info while
                    885:        ' copying the autoexec file.
                    886: 
                    887:        AutoExecRpc$ = mid$(AutoExec$, 1, len(AutoExec$)-3)+"rpc"
                    888: 
                    889:        Open AutoExec$ for Input As 1
                    890:        Open AutoExecRpc$ for Output As 2
                    891: 
                    892:        while not eof(1)
                    893:            line input #1, Buffer$
                    894: 
                    895:            if len(Buffer$) = 0 then
                    896:                print #2, Buffer$
                    897: 
1.1.1.3 ! root      898:            elseif UpdatePath and instr (Ucase$(Buffer$), Ucase$(Newpath$)) and instr (Ucase$(Buffer$), Ucase$(Basepath$)) then
1.1       root      899:                UpdatePath = FALSE
                    900: 
                    901:            elseif UpdateReg and instr(Ucase$(Buffer$), "RPC_REG_DATA_FILE") then
                    902:                UpdateReg = FALSE
                    903: 
                    904:            else
                    905:                print #2, Buffer$
                    906: 
                    907:            end if
                    908: 
                    909:        wend
                    910: 
                    911: 
                    912:        ' Append any needed values to the autoexe file
                    913: 
                    914:        if UpdateReg then
1.1.1.3 ! root      915:            print #2, "set RPC_REG_DATA_FILE="+MakePath(RegPath$, "rpcreg.dat")
1.1       root      916:        end if
                    917: 
                    918:        if UpdatePath then
1.1.1.3 ! root      919:            print #2, NewPath$+";"+BasePath$+"\bin"
1.1       root      920:        end if
                    921: 
                    922:        Close #1, #2
                    923: 
                    924:        if UpdateReg = FALSE and UpdatePath = FALSE then
                    925:            RemoveFile AutoExecRpc$, cmoNone
                    926:            goto NoAutoExec
                    927:        end if
                    928: 
1.1.1.3 ! root      929: '$ifndef RUNTIMEINSTALL
        !           930:        i% = DoMsgBox("In order for the runtime and compiler to function, "+ AutoExec$ + " needs to be changed. Do you want to update this file?", "Update "+ AutoExec$, 4+MB_TASKMODAL+32)
        !           931: '$else
        !           932:        i% = DoMsgBox("In order for the runtime to function, setup needs to change "+ AutoExec$ + ". Do you want setup to update this file?", "Update "+ AutoExec$, 4+MB_TASKMODAL+32)
        !           933: '$endif
1.1       root      934: 
                    935:        if i% = 6 then
                    936:            BackupFile AutoExec$, "Autoexec.bak"
                    937:            CopyFile AutoExecRpc$, AutoExec$, cmoOverwrite, FALSE
                    938:            RemoveFile AutoExecRpc$, cmoNone
                    939:        else
1.1.1.3 ! root      940:            i% = DoMsgBox("An updated "+AutoExec$+" is in the file "+AutoExecRpc$, "New Autoexec.bat", MB_OK+MB_TASKMODAL)
1.1       root      941:        end if
                    942: 
                    943:     endif
                    944: 
                    945: NoAutoExec:
                    946: 
                    947:     ' DumpCopyList "c:\tmp\t"
                    948:     CopyFilesInCopyList
                    949: 
1.1.1.2   root      950:     if verdllPath$ = "" then
                    951:        verdllPath$ = FindFileInTree("ver.dll", WinSysPath$)
                    952:        RemoveFile verdllPath$, cmoVital
                    953:     endif
1.1       root      954: 
1.1.1.3 ! root      955: 'Update the users windows\system.ini if required
        !           956: 
        !           957:     SystemIni$ = WinPath$ + "system.ini"
        !           958:     SystemIniRpc$ = mid$(SystemIni$, 1, len(SystemIni$) - 3)+"rpc"
        !           959: 
        !           960:     while DoesFileExist(SystemIni$, femExists) = 0
        !           961:        goto NoSystemIni
        !           962:     wend
        !           963: 
        !           964:     while not DoesDirExist(NtDir$) = 0
        !           965:        goto NoSystemIni
        !           966:     wend
        !           967: 
        !           968:     Open SystemIni$ for Input as 1
        !           969:     Open SystemIniRpc$ for Output as 2
        !           970: 
        !           971: '$ifndef RUNTIMEINSTALL
        !           972: 
        !           973:     'Look for [386Enh] while writing all but c7 drivers.
        !           974:     while not eof(1)
        !           975:        line input #1, Buffer$
        !           976: 
        !           977:        if 0 = instr(Ucase$(Buffer$), Ucase$("=*vmcpd")) and 0 = instr(Ucase$(Buffer$), Ucase$("vpfd.386")) then
        !           978:            print #2, Buffer$
        !           979:        end if
        !           980: 
        !           981:        'If found [386Enh], then print c7 device drivers
        !           982:        if instr(Ucase$(Buffer$), Ucase$(ThreeEightySixEnhStr$)) then
        !           983:            print #2, "device=*vmcpd"
        !           984:            print #2, "device="+BasePath$+"\bin\vpfd.386"
        !           985:            ThreeEightySixEnh = 1
        !           986:        end if
        !           987: 
        !           988:     wend
        !           989: 
        !           990:     'If [386Enh] not found, so drivers not written, handle here.
        !           991:     if ThreeEightySixEnh <> 1 then
        !           992:        print #2, "[386Enh]"
        !           993:        print #2, "device=*vmcpd"
        !           994:        print #2, BasePath$+"\vpfd.386"
        !           995:        ThreeEightySixEnh = 1
        !           996:     end if
        !           997: 
        !           998:     close #1
        !           999:     close #2
        !          1000: 
        !          1001: 'Now ask if they want the new system.ini
        !          1002: 
        !          1003:     i% = DoMsgBox("In order for the compiler to function, setup needs to change your system.ini file. Do you want setup to update this file?", "Update Windows system.ini", 4+MB_TASKMODAL+32)
        !          1004: 
        !          1005:     if i% = 6 then
        !          1006:        BackupFile SystemIni$, "System.bak"
        !          1007:        CopyFile SystemIniRpc$, SystemIni$, cmoOverwrite, FALSE
        !          1008:        RemoveFile AutoExecRpc$, cmoNone
        !          1009:        i% = DoMsgBox("Be sure to restart windows, so that the changes in system.ini can take effect. ", "Changes in Windows system.ini", 4+MB_TASKMODAL+32)
        !          1010:     else
        !          1011:        i% = DoMsgBox("An updated system.ini is in the file "+SystemIniRpc$, "New system.ini", MB_OK+MB_TASKMODAL)
        !          1012:     end if
        !          1013: 
        !          1014: '$endif
        !          1015: 
        !          1016: NoSystemIni:
1.1       root     1017: '$ifdef SystemNetApi
                   1018: 
                   1019:     if ReStartListEmpty() = 0 then
                   1020: 
                   1021:        SetRestartDir BasePath$
                   1022:        i% = DoMsgBox("Setup will now restart Windows to complete installation. Close any MS-DOS applications before continuing.", "Restart Windows", MB_OK+MB_TASKMODAL)
                   1023: 
                   1024:        i% = ExitExecRestart()
                   1025:        i% = DoMsgBox("Restart failed. Run _mssetup.bat from the "+BasePath$+" directory from MS-DOS prompt.", "Restart Windows", MB_OK+MB_TASKMODAL+MB_ICONHAND)
                   1026:     end if
                   1027: 
                   1028: '$endif
                   1029: 
                   1030: 
                   1031: QUIT:
                   1032:     ON ERROR GOTO ERRQUIT
1.1.1.3 ! root     1033:     OldNetapiPath$ = FindTargetOnEnvVar("netapi.old", "PATH")
        !          1034: 
        !          1035:     if OldNetapiPath$ <> "" then
        !          1036:        BackupFile OldNetapiPath$, "netapi.dll"
        !          1037:     end if
1.1       root     1038: 
                   1039:     if ERR = 0 THEN
                   1040:         dlg% = EXITSUCCESS
                   1041: 
                   1042:     elseif ERR = STFQUIT THEN
                   1043:         dlg% = EXITQUIT
                   1044: 
                   1045:     else
                   1046:         dlg% = EXITFAILURE
                   1047:     end if
                   1048: 
                   1049: QUITL1:
                   1050:     while UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "") = "REACTIVATE"
                   1051:     wend
                   1052: 
                   1053:     UIPop 1
                   1054: 
                   1055:     END
                   1056: 
                   1057: ERRQUIT:
                   1058:     i% = DoMsgBox("Setup sources were corrupted, email stevez!", "Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
                   1059:     END
                   1060: 
                   1061: 
                   1062: ASKQUIT:
                   1063:     sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
                   1064: 
                   1065:     if sz$ = "EXIT" THEN
                   1066:         UIPopAll
                   1067:         ERROR STFQUIT
                   1068:     elseif sz$ = "REACTIVATE" THEN
                   1069:         GOTO ASKQUIT
                   1070:     else
                   1071:         UIPop 1
                   1072:     end if
                   1073:     RETURN
                   1074: 
                   1075: Function GetPath(Dialog%, Path$) Static AS INTEGER
                   1076: 
                   1077:     SetSymbolValue "EditTextIn", Path$
                   1078:     SetSymbolValue "EditFocus", "END"
                   1079: 
                   1080:     sz$ = UIStartDlg(CUIDLL$, Dialog%, "FEditDlgProc", Dialog% + 1, HELPPROC$)
                   1081:     NewPath$ = GetSymbolValue("EditTextOut")
                   1082: 
                   1083:     GetPath = FALSE
                   1084: 
                   1085:     if sz$ = "CONTINUE" THEN
                   1086:        Path$ = NewPath$
                   1087:        GetPath = TRUE
                   1088:     end if
                   1089: 
                   1090:     UIPop (1)
                   1091:   
                   1092: end function
                   1093: 
                   1094: 
                   1095: function GetTransport() Static as INTEGER
                   1096: 
                   1097:     RemoveSymbol "ListItemsIn"
                   1098: 
                   1099:     if WindowsRuntime then
                   1100:        MakeListFromSectionKeys "ListItemsIn", "wtrans"
                   1101:     end if
                   1102: 
                   1103:     if MSDOSRuntime then
                   1104: 
                   1105:        MakeListFromSectionKeys "ListTmp", "dtrans"
                   1106:        CopyList "ListItemsIn", "ListTmp", FALSE
                   1107:     end if
                   1108: 
                   1109:     GetTransport = FALSE
                   1110: 
                   1111: RESTART_RUNTIME_OPTION:
                   1112:     sz$ = UIStartDlg(CUIDLL$, DlgTransport, "FMultiDlgProc", HlpTransport, HELPPROC$)
                   1113:     
                   1114:     if sz$ = "CONTINUE" THEN
                   1115:        GetTransport = TRUE
                   1116: 
                   1117:     elseif sz$ = "REACTIVATE" THEN
                   1118:        GOTO RESTART_RUNTIME_OPTION
                   1119: 
                   1120:     end if
                   1121: 
                   1122:     CopyList "SelectedTransports" , "ListItemsOut", TRUE
                   1123: 
                   1124:     UIPop(1)
                   1125: 
                   1126: end function
                   1127: 
                   1128: 
                   1129: '**
                   1130: '** Purpose:
                   1131: '**     Appends a file name to the end of a directory path,
                   1132: '**     inserting a backslash character as needed.
                   1133: '** Arguments:
                   1134: '**     szDir$  - full directory path (with optional ending "\")
                   1135: '**     szFile$ - filename to append to directory
                   1136: '** Returns:
                   1137: '**     Resulting fully qualified path name.
                   1138: '*************************************************************************
                   1139: 
                   1140: FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
                   1141:     if szDir$ = "" THEN
                   1142:         MakePath = szFile$
                   1143:     elseif szFile$ = "" THEN
                   1144:         MakePath = szDir$
                   1145:     elseif MID$(szDir$, LEN(szDir$), 1) = "\" THEN
                   1146:         MakePath = szDir$ + szFile$
                   1147:     else
                   1148:         MakePath = szDir$ + "\" + szFile$
                   1149:     end if
                   1150: END FUNCTION
                   1151: 
                   1152: FUNCTION GetCheck (index%) STATIC AS INTEGER
                   1153: 
                   1154:     if GetListItem("CheckItemsState", index%) = "ON" then
                   1155:        GetCheck = TRUE
                   1156:     else
                   1157:        GetCheck = FALSE
                   1158:     end if
                   1159: 
                   1160: END FUNCTION
                   1161: 
                   1162: 
                   1163: Sub CopyList(ListOut$, ListIn$, Truncate%) static
                   1164: 
                   1165:     if Truncate% <> 0 then
                   1166:        RemoveSymbol ListOut$
                   1167:     end if
                   1168: 
                   1169:     for i% = 1 to GetListLength(ListIn$) step 1
                   1170:        AddListItem ListOut$, GetListItem(ListIn$, i%)
                   1171:     next
                   1172: 
                   1173: end sub
                   1174: 
                   1175: function BoolToOnOff (Bool%) static AS String
                   1176: 
                   1177:     if Bool% then
                   1178:         BoolToOnOff$ = "ON"
                   1179:     else
                   1180:         BoolToOnOff$ = "OFF"
                   1181:     end if
                   1182: 
                   1183: end function
                   1184: 
                   1185: function FormatSize () static AS String
                   1186: 
                   1187:     cbMore& = GetCopyListCost ("", "Cost", "")
                   1188:     cbSize = val(GetListItem("Cost", asc(BasePath$) - asc("A") + 1)) / 1024
                   1189: 
                   1190:     if cbSize then
                   1191:        FormatSize = str$(cbSize)+"K"
                   1192:     else
                   1193:        FormatSize = ""
                   1194:     end if
                   1195: 
                   1196:     ClearCopyList
                   1197: 
                   1198: end function
                   1199: 
                   1200: 
                   1201: function GetSampleSize () static AS String
                   1202: 
                   1203: 
                   1204:     if SamplesSDK and MSDOSSDK then
                   1205:        AddSectionFilesToCopyList "sample1", SrcDir$, BasePath$
                   1206:        AddSectionFilesToCopyList "sample3", SrcDir$, BasePath$
                   1207:        AddSectionFilesToCopyList "sample4", SrcDir$, BasePath$
                   1208:        AddSectionFilesToCopyList "sample5", SrcDir$, BasePath$
                   1209:        AddSectionFilesToCopyList "sample6", SrcDir$, BasePath$
                   1210:        AddSectionFilesToCopyList "sample7", SrcDir$, BasePath$
                   1211:        AddSectionFilesToCopyList "sample8", SrcDir$, BasePath$
                   1212:        AddSectionFilesToCopyList "sample9", SrcDir$, BasePath$
                   1213:        AddSectionFilesToCopyList "sample10",SrcDir$, BasePath$
                   1214:     end if
                   1215: 
                   1216:     if SamplesSDK and WindowsSDK then
                   1217:        AddSectionFilesToCopyList "wsample2", SrcDir$, BasePath$
                   1218:        AddSectionFilesToCopyList "wsample11",SrcDir$, BasePath$
                   1219:     end if
                   1220: 
                   1221:     GetSampleSize = FormatSize()
                   1222: 
                   1223: end function
                   1224: 
                   1225: function GetDosSize () static AS String
                   1226: 
                   1227:     if MSDOSSDK then
                   1228:        AddSectionFilesToCopyList "include", SrcDir$, BasePath$
                   1229:        AddSectionFilesToCopyList "dinclude", SrcDir$, BasePath$
                   1230:        AddSectionFilesToCopyList "dlib", SrcDir$, BasePath$
                   1231:     end if
                   1232: 
                   1233:     GetDosSize = FormatSize()
                   1234: 
                   1235: end function
                   1236: 
                   1237: function GetDosRunSize () static AS String
                   1238: 
                   1239:     if MSDOSRuntime then
                   1240:        AddSectionFilesToCopyList "druntime", SrcDir$, BasePath$
                   1241:     end if
                   1242: 
                   1243:     GetDosRunSize = FormatSize()
                   1244: 
                   1245: end function
                   1246: 
                   1247: function GetWinSize () static AS String
                   1248: 
                   1249:     if WindowsSDK then
                   1250:        AddSectionFilesToCopyList "include", SrcDir$, BasePath$
                   1251:        AddSectionFilesToCopyList "winclude", SrcDir$, BasePath$
                   1252:        AddSectionFilesToCopyList "wlib", SrcDir$, BasePath$
                   1253:     end if
                   1254: 
                   1255:     GetWinSize = FormatSize()
                   1256: 
                   1257: end function
                   1258: 
                   1259: function GetWinRunSize () static AS String
                   1260: 
                   1261:     if WindowsRuntime then
                   1262:        AddSectionFilesToCopyList "wruntime", SrcDir$, BasePath$
                   1263:     end if
                   1264: 
                   1265:     GetWinRunSize = FormatSize()
                   1266: 
                   1267: end function
                   1268: 
                   1269: 
                   1270: function GetTransportSize () static AS String
                   1271: 
                   1272:     if AllTransports then
                   1273:        RemoveSymbol "SelectedTransports"
                   1274:     end if
                   1275: 
                   1276:     if WindowsRuntime and AllTransports then
                   1277:        MakeListFromSectionKeys "SelectedTransports", "wtrans"
                   1278:     end if
                   1279: 
                   1280:     if MSDOSRuntime and AllTransports then
                   1281: 
                   1282:        MakeListFromSectionKeys "ListTmp", "dtrans"
                   1283:        CopyList "SelectedTransports", "ListTmp", FALSE
                   1284:     end if
                   1285: 
                   1286:     for i% = 1 to GetListLength("SelectedTransports") step 1
                   1287: 
                   1288:        tran$ = GetListItem("SelectedTransports", i%)
                   1289: 
                   1290:        if instr (tran$, "DOS") then
                   1291:            AddSectionKeyFileToCopyList "dtrans", tran$, SrcDir$, BasePath$
                   1292:        else
                   1293:            AddSectionKeyFileToCopyList "wtrans", tran$, SrcDir$, BasePath$
                   1294: 
                   1295:        end if
                   1296:     next
                   1297: 
                   1298:     GetTransportSize = FormatSize()
                   1299: 
                   1300: end function
                   1301: 
                   1302: 
                   1303: function GetHlpSize () static AS String
                   1304: 
                   1305:     if HelpFiles then
                   1306: 
                   1307:        if WindowsSDK then
                   1308:            AddSectionFilesToCopyList "wHelp", SrcDir$, BasePath$
                   1309:        end if
                   1310: 
                   1311:     end if
                   1312: 
                   1313:     GetHlpSize = FormatSize()
                   1314: 
                   1315: end function

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.