Suddenly something that has worked for months, is giving me an error and driving me crazy.
Upon opening the application, it checks to see if there is a later version of the executable on the network, and replaces the version on the users hard drive with the version of the network.
This worked perfect on my machine just a couple of hours ago, and now it is giving other users the error "Run-time error '-2147467259 (80004005)' [DBNMPTNTW] Access denied".
Here is the code when the application is opened:
Code:
On Error GoTo Local_Err
If Update = False Then
If FileDateTime("S:\GROUP\ENG\eRoutings\RepairProject.exe" > FileDateTime("C:\Program Files\RepairProject\RepairProject.exe" Then
Shell "S:\GROUP\ENG\eRoutings\Update\Update.exe", vbNormalFocus
Update = True
End
End If
End If
Local_Err:
If Err.Number Then MsgBox Err.Description, vbOKOnly, "Update Error!"
And the shelled program does this:
Code:
If App.PrevInstance = True Then
MsgBox "Application is already running ! "
End
End If
Dim Delay&, FileCheck
frmUpdateDuckII.Show: DoEvents
Delay = Timer
While Timer < Delay + 2
Text1 = "Duck II is updating....Please Wait !!!" & vbCrLf _
& Format(5 - (Timer - Delay), "#" & " Secs."
DoEvents
Text1.SelStart = Len(Text1)
Wend
'copy file to users pc
FileCopy "S:\GROUP\ENG\eRoutings\RepairProject.exe", "C:\Program Files\RepairProject\RepairProject.exe"
While Timer < Delay + 5
Text1 = "Duck II is updating....Please Wait !!!" & vbCrLf _
& Format(5 - (Timer - Delay), "#" & " Secs."
DoEvents
Text1.SelStart = Len(Text1)
Wend
Shell "C:\Program Files\RepairProject\RepairProject.exe", vbNormalFocus
End
Any help would be greatly appreciated before I pull my hair out!
Upon opening the application, it checks to see if there is a later version of the executable on the network, and replaces the version on the users hard drive with the version of the network.
This worked perfect on my machine just a couple of hours ago, and now it is giving other users the error "Run-time error '-2147467259 (80004005)' [DBNMPTNTW] Access denied".
Here is the code when the application is opened:
Code:
On Error GoTo Local_Err
If Update = False Then
If FileDateTime("S:\GROUP\ENG\eRoutings\RepairProject.exe" > FileDateTime("C:\Program Files\RepairProject\RepairProject.exe" Then
Shell "S:\GROUP\ENG\eRoutings\Update\Update.exe", vbNormalFocus
Update = True
End
End If
End If
Local_Err:
If Err.Number Then MsgBox Err.Description, vbOKOnly, "Update Error!"
And the shelled program does this:
Code:
If App.PrevInstance = True Then
MsgBox "Application is already running ! "
End
End If
Dim Delay&, FileCheck
frmUpdateDuckII.Show: DoEvents
Delay = Timer
While Timer < Delay + 2
Text1 = "Duck II is updating....Please Wait !!!" & vbCrLf _
& Format(5 - (Timer - Delay), "#" & " Secs."
DoEvents
Text1.SelStart = Len(Text1)
Wend
'copy file to users pc
FileCopy "S:\GROUP\ENG\eRoutings\RepairProject.exe", "C:\Program Files\RepairProject\RepairProject.exe"
While Timer < Delay + 5
Text1 = "Duck II is updating....Please Wait !!!" & vbCrLf _
& Format(5 - (Timer - Delay), "#" & " Secs."
DoEvents
Text1.SelStart = Len(Text1)
Wend
Shell "C:\Program Files\RepairProject\RepairProject.exe", vbNormalFocus
End
Any help would be greatly appreciated before I pull my hair out!