summaryrefslogtreecommitdiffstats
path: root/private/rpc/install/setup.sus
blob: f4c73110c141781bd6a317e81bbb36733e42dd53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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
cls :a 63 "Microsoft Remote Procedure Call Setup"
echo
echo "                     Copyright (C) 1992 by Microsoft"
echo
echo "Warning:"
echo
echo "  If you have files with the same file names as files copied during"
echo "  installation, the old versions will be overwritten."
echo
echo "  If you have not backed up the distribution disks or if you do"
echo "  not have copies of old versions, you should make backup copies now."
echo
echo "Interacting with setup"
echo
echo "  When setup asks you for input, the default value is highlighted."
echo "  Pressing enter will signal your acceptance of the input."
echo "  You may use the backspace key to erase the default and enter a new value."
echo "  Multiple items listed in a box are selected with the Up/Down arrow keys."
echo "  Yes or No questions are answered by pressing Y or N."

echo

set yes=1
set ok ="ok"
set new = "<new>"

dialog yesNo,yes,"Press Enter to continue: "
if (yes == 0) then exit 1

set fAllClient=1
set fmoddosPath=0

cls
echo "An application which uses RPC loads componets of the run-time when"
echo "the application is run.  You may chose to install these files in"
echo "a directory already on your path or a some place else.  If the directory"
echo "is not on your path, setup will add this directory to it."
echo
echo "What directory do you want the RPC runtime MS-DOS .DLL files in?"
dialog listbox,"MS-DOS Directory", PATH&";" &new, dosPath, idosPath

if (idosPath == 1) then set fmoddosPath=1

if (dosPath == new)
    set dosPath=""
    set fmoddosPath=1
    dialog simple,dosPath,"Enter new path for MS-DOS DLL: "
endif

set fAllDrivers=1
cls
echo "Network drivers are run-time DLLs which interface the RPC run-time"
echo "with the specific Network software installed on your machine."
echo "You may chose to install only those drivers which you need"
echo "to save disk space."
echo
echo "Would you like to install all the runtime network drivers?"
echo
dialog yesNo,fAllDrivers,"Load All Drivers: "

set fDriver1=0
set vDriver1="Lanman 2.0/2.1 - Named Pipes"

set fDriver2=0
set vDriver2="DCE or 3COM - TCP/IP"

set fDriver3=0
set vDriver3="DEC Net"

set fDriver4=0
set vDriver4="Generic - NetBios"

set fDriver5=0
set vDriver5="tcp - NetBios"

if (fAllDrivers == 1)
    set fDriver1=1
    set fDriver2=1
    set fDriver3=1
    set fDriver4=1
    set fDriver5=1
    goto allDrivers
end if

:anotherDriver

cls
echo "Use the cursor keys to hilight the driver you want and press ENTER."
echo "Select Done when finished."
echo
echo "You will now select from a list of network drivers."
echo

set select=""
if (fDriver1 == 0) then set select=vDriver1
if (fDriver2 == 0) then set select=select&";"&vDriver2
if (fDriver3 == 0) then set select=select&";"&vDriver3
if (fDriver4 == 0) then set select=select&";"&vDriver4
if (fDriver5 == 0) then set select=select&";"&vDriver5

dialog listbox,"Network Drivers", select&";Done", driver, 1

if (driver == vDriver1) then set fDriver1=1
if (driver == vDriver2) then set fDriver2=1
if (driver == vDriver3) then set fDriver3=1
if (driver == vDriver4) then set fDriver4=1
if (driver == vDriver5) then set fDriver5=1

if (driver != "Done") then goto anotherDriver

:allDrivers
cls

set config="autoexec.bat"
set configBak="autoexec.bak"
set pathString="$path"

echo "Setup can modify your " config " file so that the network drivers"
echo "can be loaded with the application runs.  Setup will save a copy of " config
echo "with an extension of .BAK."
echo

set fModeConfig=1
dialog yesNo, fModeConfig, "Modify "&config&" for you? "

;goto ttt
; Write a new registry file

set RegRoot="c:\"
set RegFile="c:\"&"rpcreg.dat"
set Prefix="\Root\Software\Microsoft\Rpc\NameService\"

set Params=""
set Params=Params&Prefix&"Protocol=ncacn_np"&nl
set Params=Params&Prefix&"NetworkAddress=\\."&nl
appendfile RegFile, Params, Create

set Params=""
set Params=Params&Prefix&"EndPoint=\pipe\locator"&nl
set Params=Params&Prefix&"DefaultSyntax=3"&nl
appendfile RegFile, Params

set Prefix="\Root\Software\Microsoft\Rpc\ClientProtocols\"

if (fDriver1 == 1) then appendfile RegFile,Prefix&"ncacn_np=rpc16c1"&nl
if (fDriver2 == 1) then appendfile RegFile,Prefix&"ncacn_np=rpc16c3"&nl
if (fDriver3 == 1) then appendfile RegFile,Prefix&"ncacn_np=rpc16c4"&nl

; NETBIOS
; Add new netBios drivers here, one to each list.  There are three
; default drivers, one each for NetBios, XNS and TCP.  Remove the
; commented line and replace the ??? values.

if (fDriver4 == 1) then appendfile RegFile,Prefix&"ncacn_nb_nb=rpc16c5"&nl
if (fDriver4 == 1) then appendfile RegFile,Prefix&"ncacn_nb_xns=rpc16c5"&nl
if (fDriver5 == 1) then appendfile RegFile,Prefix&"ncacn_nb_tcp=rpc16c6"&nl

;;if (fDriver4 == 1) then appendfile RegFile,Prefix&"ncacn_nb_???=rpc16c5"&nl

set Prefix="\Root\Software\Microsoft\Rpc\NetBios\"

if (fDriver4 == 1) then appendfile RegFile,Prefix&"ncacn_nb_nb0=0"&nl
if (fDriver4 == 1) then appendfile RegFile,Prefix&"ncacn_nb_xns0=0"&nl
if (fDriver4 == 1) then appendfile RegFile,Prefix&"ncacn_nb_tcp0=0"&nl

;;if (fDriver4 == 1) then appendfile RegFile,Prefix&"ncacn_nb_???0=0"&nl

:ttt
; Now modify autoexec.bat

if (fModeConfig == 1)
 echo
 echo "Setup is now modifing your " config " file..."
 set configDrive="c:\"

:getConfig

 if (not exist configDrive&config)
    dialog simple, configDrive, "Enter Drive name for "&config&": "
    goto getConfig
 endif

 set config=configDrive&config
 copyto config configDrive&configBak

 if (fmoddosPath == 1) then appendfile config,";"&dosPath,pathString

 if (configDrive != "c:\x")
     appendfile config, configDrive, "^set rpc_reg_data_file="
     if (status != 0) then appendfile config, "set RPC_REG_DATA_FILE=C:\rpcreg.dat"&nl
 endif


endif

echo

; All user Input has been completed, now do it

cls
echo "Setup will now copy files to the following paths."
echo
echo "Runtime RPC files: " dosPath

set cPath=dosPath

copy "rpcrun"

if (fDriver1 == 1) then copy "rpctrans\rpc16c1.rpc"
if (fDriver2 == 1) then copy "rpctrans\rpc16c3.rpc"
if (fDriver3 == 1) then copy "rpctrans\rpc16c4.rpc"
if (fDriver4 == 1) then copy "rpctrans\rpc16c5.rpc"
if (fDriver5 == 1) then copy "rpctrans\rpc16c6.rpc"


echo "You will have to reboot your computer to get new "
echo "settings in " config " to take effect."

endif