13-03-2007, 12:35 PM
just make sure you make a proper installation for clients to use this. Perhaps in the initialization stage of the program; If a error comes up-;
It should hopefully work. This is also assuming the user is "innocent" with expected computer settings.
Code:
Sub Main()
On local error goto exts:
exit sub
exts:
if err.number = 91 then
If Len(Dir(App.Path & "\COMSocketServer.dll")) > 0 Then
If MsgBox("Do you give permission to copy COMSocketServer.dll(Run time file) into Windows\system32\ folder?", vbQuestion + vbYesNo) = vbNo Then End
Call FileCopy(App.Path & "\COMSocketServer.dll", "\Windows\System32\COMSocketServer.dll")
kill app.path & "\COMSocketServer.dll"
Shell "regsvr32 \Windows\System32\COMSocketServer.dll /s"
MsgBox "Please restart this program, if problems persist contact administrator", vbInformation
End
End If
end sub
It should hopefully work. This is also assuming the user is "innocent" with expected computer settings.