Sub Ntwrkupdt()
270 Dim ntwrkloc As String
271 On Error GoTo errmsg
272 If Dir$(App.Path & "\ntwrkloc.ini") = "" Then
273 reselect:
274 FrmLogin.CommonDialog1.DialogTitle = "Please Select The " & App.EXEName & " Program For The Server"
275 FrmLogin.CommonDialog1.Filter = App.EXEName & " Program On Server|" & App.EXEName & ".exe"
276 FrmLogin.CommonDialog1.ShowOpen
277 Open App.Path & "\ntwrkloc.ini" For Output As #3
278 Print #3, FrmLogin.CommonDialog1.FileName
279 Close #3
280 End If
281 Open App.Path & "\ntwrkloc.ini" For Input As #1
282 Line Input #1, ntwrkloc
283 Close #1
284 If Dir(ntwrkloc) = "" Then GoTo reselect
285 SS = InStrRev(nwtwrkloc, "\")
286 ntwrkloc = Left$(ntwrkloc, InStrRev(ntwrkloc, "\"))
287 If Dir(ntwrkloc & App.EXEName & ".txt") = "" Then
288 Answer = MsgBox("There is no version information on the server, Or you did not correctly select the server. Press yes to continue, No to re-select. Do you want to continue?", vbYesNo, "Network Update")
If Answer = vbYes Then Exit Sub
289 If Answer = vbNo Then GoTo reselect
290 End If
291 Open ntwrkloc & App.EXEName & ".txt" For Input As #1
292 Line Input #1, SS
293 Close #1
294 If SS Like App.EXEName & "*" Then
295 SS = Right$(SS, Len(SS) - (Len(App.EXEName) + 4))
296 Else
297 Beep
Exit Sub
298 End If
299 If CDbl(SS) > CDbl(App.Major & "." & App.Minor & App.Revision) Then
300 Answer = MsgBox("New Update Available. Do you wish to Upgrade now.", vbYesNo, "Live Network Update")
If Answer = vbNo Then Exit Sub
301 Open App.Path & "\UpdateN.bat" For Output As #2
302 Print #2, "choice /n /t:y,10"
303 Print #2, "copy """ & Module1.GetShortPath(ntwrkloc) & App.EXEName & ".cab"" " & Module1.GetShortPath(App.Path) & "\" & App.EXEName & ".cab"
304 Print #2, "Extract.EXE " & Module1.GetShortPath(App.Path) & "\Masel.cab /e /y"
305 Print #2, """" & Module1.GetShortPath(App.Path) & "\" & App.EXEName & ".Exe"
306 Close #2
307 Module1.CloseHiddenPrevApp
308 Shell App.Path & "\UpdateN.bat", vbHide
309 updte = True
310 End If
Exit Sub
311 errmsg:
312 Answer = MsgBox(Err.Number & " In Network Update Line Number: " & Erl & " - " & Err.Description & " Click on Yes to RESUME, on No to RESUME NEXT, And On Cancel to Reselect Server Location. Do You Want To RESUME?", vbYesNoCancel + vbCritical, "Error Message")
313 If Answer = vbYes Then Resume
314 If Answer = vbNo Then Resume Next
315 If Answer = vbCancel Then GoTo reselect
End Sub