Comment ========================================================== Computer Tyme Attach * Copyright 1993-94 by Marc Perkel All Rights Reserved Computer Tyme * 309 North Jefferson, #220 * Springfield Mo. 65806 (800) 548-5353 Sales * (417) 866-1222 Voice * (417) 866-1665 Data/Fax ATTACH is a replacement for Novell's Attach utility. It works with Netware 4.x servers with connection numbers greater than 255 and more than 8 servers when used with the VLM shells. If anyone wants any other netware utilities rewritten for 4.x let me know. Especially if you are willing to buy them after I write them. ========================================================== EndComment ;#Define Shareware ;------ Create Variables Var AttachedServers Servers Server User Pass Setup InputInfo Login Writeln ResultString FixPath ;======================= P R O C E D U R E S =========================== Procedure InputInfo InputLength = 40 UpperCaseOnly if Server = '' Write 'Server: ' Server = UpperCase(Readln) if (Server = '') and (LastKey <> Esc) PickServer endif Writeln endif if LastKey = Esc then Exitmenu if User = '' if PosInSortedList(Server,AttachedServers) > 0 NovPreferredServer = Server Write 'You are already logged in to server ' Writeln Server ' as ' NovLoginName '.' if not YesNo('Do you wish to continue','Y') ExitMenu endif NovPreferredServer = '' endif endif NovAttach(Server) if NovResult <> 0 if NovResult = 250 Writeln 'No More Server Connection Slots!' else Writeln 'Attach Failed! ' NovResult endif ExitCode 1 ExitMenu endif if User = '' Write 'Username: ' User = UpperCase(Readln) Writeln endif if LastKey = Esc then Exitmenu if User = '' then Exitmenu Login if NovResult = 255 if Pass = '' Write 'Password: ' EchoChar Off Pass = UpperCase(Readln) Writeln endif if LastKey = Esc then Exitmenu endif EndProc Procedure Login NovLogin(Server + '/' + User,Pass) EndProc Procedure ResultString if NovResult = 0 Return 'You are logged in to server ' + Server elseif NovResult = 254 Return('All Logins Disabled!') elseif NovResult = 252 Return('The user name ' + User + ' is not a valid user on this server!') elseif NovResult = 220 Return('Your Account has been Disabled!') elseif (NovResult = 218) or (NovResult = 219) Return('You are not allowed to log in at this time!') elseif NovResult = 197 Return('This Workstation has been Locked Out!') elseif NovResult = 214 Return('Requires Encrypted Password!') elseif NovResult = 222 Return('Your Password has Expired!') elseif NovResult = 255 Return('The Password you entered is Incorrect!') else Return('Attach Failed! '+ Str(NovResult)) endif EndProc #If Shareware Procedure Beg BoxBorderColor Green Blue BoxInsideColor White Blue BoxHeaderColor Yellow Mag BoxHeader ' * Shameless Beg Screen * ' DrawBox 10 8 61 6 Writeln WriteCenter '* Attach Evaluation Copy *' Writeln WriteCenter 'Please remember to register this software.' Wait 600 EraseTopWindow ClearKbdBuffer EndProc #Endif Procedure PickServer var Width Height StandardIO Off BoxHeader ' Servers ' Width = Max(LongestString(Servers) + 6,13) Height = Min(20,NumberOfElements(Servers) + 2) DrawBox(ScreenWidth - Width / 2,ScreenHeight - Height / 2,Width,Height) Server = PickOne(Servers) EraseTopWindow StandardIO Write Server EndProc Procedure YesNo (Prompt, Orig) var Answer Write Prompt '? ' Orig Char(8) Answer = ReadKey if Answer = CR then Answer = Orig Answer = Answer = 'Y' if Answer Writeln 'Yes' else Writeln 'No' endif Return Answer EndProc Procedure Help Include 'ADDRESS.INC' Writeln "ATTACH is a replacement for Novell's Attach program. It has" Writeln 'been adapted to work with Netware 4.x servers and VLM shells.' Writeln 'It can attach to more that 8 fileservers.' Writeln Writeln 'USAGE: ATTACH server/name/password' Writeln Writeln 'ATTACH is licensed for $95/fileserver, $995 site license.' ExitMenu EndProc Procedure Setup var P #If Shareware Beg #Endif ExitCode = 0 StandardIO Writeln Writeln 'Computer Tyme ATTACH * Copyright 1993-94 by Marc Perkel' Writeln 'All Rights Reserved * Version 1.01 * Release Date: 11-25-93' Writeln if pos('/?',CmdLine) > 0 Help endif if NovConnection = 0 Writeln 'This utility works only with NetWare!' ExitCode = 1 ExitMenu endif Server = UpperCase(CmdLine) Trim(Server) P = pos('/',Server) if P > 0 User = Mid(Server,succ(P),255) Server = Left(Server,pred(P)) endif P = pos('/',User) if P > 0 Pass = Mid(User,succ(P),255) User = Left(User,pred(P)) endif NovServers(Servers) SortArray(Servers) if NumberOfElements(Servers) < 2 Writeln "There's no more servers to attach to!" ExitCode = 1 ExitMenu endif delete(Servers,PosInSortedList(NovDefaultServer,Servers),1) NovAttachedServers(AttachedServers) SortArray(AttachedServers) EndProc