home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
vlmkt6.exe
/
WS_LWP_W.CPF
< prev
next >
Wrap
Text File
|
1993-09-28
|
4KB
|
135 lines
/*
** Copyright (c) 1992 Novell, Inc. All Rights Reserved.
**
** THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS
** AND TREATIES. NO PART OF THIS WORK MAY BE USED, PRACTICED,
** PERFORMED COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED,
** ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED,
** RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT
** OF NOVELL, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
** AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND CIVIL
** LIABILITY.
*/
syntax (1.1);
component (
/* CompID */ WS_LWP_W,
/* CompVer */ 4.1,
/* CompStatus */ Retail
);
string targetName[49]; /* Names of the files */
string sourceName[3]; /* Names of the files */
string backupName[3]; /* Names of the files */
string sourceDirectory;
string targetDirectory;
int i; /* Loop counter */
string systemDirectory; /* Path to Windows\system directory */
string sourceFile; /* File names including path */
string iniString; /* Value from/for .INI files */
int rc; /* Return code from various functions */
string lwpGrpPath;
string dummy; /* Dummy variable */
string group;
int count; /* Number of devices found in system.ini */
string tempPath; /* Path to temporary files */
int fh; /* File handle for fopen, etc. */
int fho; /* Output file handle for fopen, etc. */
int fc; /* Return code from fgets when rc is busy */
string inputLine; /* Line read from file */
string scanLine;
string resolution; /* Temporary string */
string baseName; /* Temporary string */
string displayType; /* Temporary string */
string loc;
int lineNumber;
int pushed;
int vSrc;
int vDst;
/*
================================
= Save the old wlibsock.dll. =
================================
*/
if (IsFile (windowsDirectory + "\\wlibsock.dll")) {
sourceName = windowsDirectory + "\\wlibsock.dll";
targetName = windowsDirectory + "\\wlibsock.old";
rename (sourceName, targetName);
DisplayHelp (RENAME_WLIBSOCK_HELP);
} /* end if */
/*
======================
= Edit SYSTEM.INI. =
======================
*/
tempPath = GetTempDir();
AppendPath (tempPath, "INSTALL.TMP");
AddStatus (EDITING, SYSTEM_INI, NO_MESSAGE);
if (silentcopy (pathSYSTEM_INI, tempPath)) {
DisplayErrorCondition (FATAL);
} /* end if */
fh = fopen (tempPath, "r");
fho = fopen (pathSYSTEM_INI, "w");
loc = "before";
fc = fgets (inputLine, fh);
scanLine = inputLine;
strupr (scanLine);
lineNumber = 1;
pushed = 0;
while (fc) {
if ((loc == "before") && searchstr (scanLine, "[386ENH]")) {
rc = fputs (inputLine, fho);
rc = fputs ("device=" + targetPath + "\\BIN\\vtcpip.386", fho);
loc = "in";
} else if ((loc == "in") && searchstr (scanLine, "VTCPIP.386")) {
/* Skip the line */
} else if ((loc == "in") && searchstr (scanLine, "[")) {
rc = fputs (inputLine, fho);
loc = "after";
} else {
rc = fputs (inputLine, fho);
} /* end if */
fc = fgets (inputLine, fh);
scanLine = inputLine;
strupr (scanLine);
if (!(lineNumber % 5)) {
if (pushed) {
PopInformationText();
pushed = 0;
} else {
PushInformationText (2, STILL_EDITING);
pushed = 1;
} /* end if */
} /* end if */
lineNumber = lineNumber + 1;
} /* end while */
if (pushed) PopInformationText();
rc = fclose (fh);
rc = fclose (fho);
rc = PutProfileString ("386Enh", /* appName */
"TimerCriticalSection", /* keyName */
"10000", /* valueString */
pathSYSTEM_INI, /* fileName */
"INI"); /* file type */
rc = PutProfileString ("NetWare", /* appName */
"NWShareHandles", /* keyName */
"TRUE", /* valueString */
pathSYSTEM_INI, /* fileName */
"INI"); /* file type */