error with exe programs

  • Thread starter Thread starter andreas
  • Start date Start date
A

andreas

I use vb.net express 2005 and when I run programs, made by myself, on
several computers I get somewhile (not on all computers) a error message.
Windows cannot access the specfied device, path, or file.....
How is this possible and can I made the program run on these computers?
Thanks for any response
 
I use vb.net express 2005 and when I run programs, made by myself, on
several computers I get somewhile (not on all computers) a error message.
Windows cannot access the specfied device, path, or file.....
How is this possible and can I made the program run on these computers?

If the application is telling you it can't find something, odds are
that "something" doesn't exist on that computer. What exactly can it
not find? Are you trying to open a text file, save something to a
shared network drive, or something else?

Thanks,

Seth Rowe
 
andreas said:
I use vb.net express 2005 and when I run programs, made by myself, on
several computers I get somewhile (not on all computers) a error message.
Windows cannot access the specfied device, path, or file.....
How is this possible and can I made the program run on these computers?

Which actions does your application perform? Are you using classes and
methods from the 'System.IO' namespace?
 
andrews said:
I use system.io
Can this be the reason?

Yes, some of the methods will show dialogs. Take a look at this sample,
which will disable the dialog that is shown if an attempt is made to access
the disk if the floppy drive is empty:

\\\
Private Declare Function SetErrorMode Lib "kernel32.dll" ( _
ByVal uMode As Int32 _
) As Int32

Private Const SEM_FAILCRITICALERRORS As Int32 = &H1
..
..
..
Dim LastMode As Int32 = _
SetErrorMode(SEM_FAILCRITICALERRORS)
Try
Dim Directories() As DirectoryInfo = _
(New DirectoryInfo("A:\")).GetDirectories()
Catch ex As Exception
MsgBox(ex.Message)
Finally
SetErrorMode(LastMode)
End Try
///
 
Back
Top